xrootd
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
XrdCl::MessageUtils Class Reference

#include <XrdClMessageUtils.hh>

Static Public Member Functions

static XRootDStatus WaitForStatus (SyncResponseHandler *handler)
 Wait and return the status of the query.
 
template<class Type >
static XrdCl::XRootDStatus WaitForResponse (SyncResponseHandler *handler, Type *&response)
 Wait for the response.
 
template<class Request >
static void CreateRequest (Message *&msg, Request *&req, uint32_t payloadSize=0)
 Create a message.
 
static XRootDStatus SendMessage (const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams, LocalFileHandler *lFileHandler)
 Send message.
 
static Status RedirectMessage (const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams, LocalFileHandler *lFileHandler)
 Redirect message.
 
static void ProcessSendParams (MessageSendParams &sendParams)
 Process sending params.
 
static void RewriteCGIAndPath (Message *msg, const URL::ParamsMap &newCgi, bool replace, const std::string &newPath)
 
static void MergeCGI (URL::ParamsMap &cgi1, const URL::ParamsMap &cgi2, bool replace)
 
static Status CreateXAttrVec (const std::vector< xattr_t > &attrs, std::vector< char > &avec)
 
static Status CreateXAttrVec (const std::vector< std::string > &attrs, std::vector< char > &nvec)
 
template<typename T >
static Status CreateXAttrBody (Message *msg, const std::vector< T > &vec, const std::string &path="")
 

Member Function Documentation

◆ CreateRequest()

template<class Request >
static void XrdCl::MessageUtils::CreateRequest ( Message *&  msg,
Request *&  req,
uint32_t  payloadSize = 0 
)
inlinestatic

Create a message.

References XrdCl::Buffer::GetBuffer(), and XrdCl::Buffer::Zero().

◆ CreateXAttrBody()

template<typename T >
static Status XrdCl::MessageUtils::CreateXAttrBody ( Message msg,
const std::vector< T > &  vec,
const std::string &  path = "" 
)
inlinestatic

Create body of xattr request and set the body size

Parameters
msg: the request
vec: the argument
path: file path

References XrdCl::Buffer::Append(), CreateXAttrVec(), ClientRequestHdr::dlen, XrdCl::Buffer::GetBuffer(), and XrdCl::Status::IsOK().

◆ CreateXAttrVec() [1/2]

static Status XrdCl::MessageUtils::CreateXAttrVec ( const std::vector< std::string > &  attrs,
std::vector< char > &  nvec 
)
static

Create xattr name vector vector

Parameters
attrs: extended attribute name list
nvec: vector containing the name vector

◆ CreateXAttrVec() [2/2]

static Status XrdCl::MessageUtils::CreateXAttrVec ( const std::vector< xattr_t > &  attrs,
std::vector< char > &  avec 
)
static

Create xattr vector

Parameters
attrs: extended attribute list
avec: vector containing the name vector and the value vector

Referenced by CreateXAttrBody().

◆ MergeCGI()

static void XrdCl::MessageUtils::MergeCGI ( URL::ParamsMap cgi1,
const URL::ParamsMap cgi2,
bool  replace 
)
static

Merge cgi2 into cgi1

Parameters
cgi1cgi to be merged into
cgi2cgi to be merged in
replaceindicates whether, in case of a conflict, the new CGI parameter should replace an existing one or be appended to it using a comma

◆ ProcessSendParams()

static void XrdCl::MessageUtils::ProcessSendParams ( MessageSendParams sendParams)
static

Process sending params.

◆ RedirectMessage()

static Status XrdCl::MessageUtils::RedirectMessage ( const URL url,
Message msg,
ResponseHandler handler,
MessageSendParams sendParams,
LocalFileHandler lFileHandler 
)
static

Redirect message.

◆ RewriteCGIAndPath()

static void XrdCl::MessageUtils::RewriteCGIAndPath ( Message msg,
const URL::ParamsMap newCgi,
bool  replace,
const std::string &  newPath 
)
static

Rewrite CGI and path if necessary

Parameters
msgmessage concerned
newCgithe new cgi
replaceindicates whether, in case of a conflict, the new CGI parameter should replace an existing one or be appended to it using a comma
newPathwill be used as the new destination path if it is not empty

◆ SendMessage()

static XRootDStatus XrdCl::MessageUtils::SendMessage ( const URL url,
Message msg,
ResponseHandler handler,
MessageSendParams sendParams,
LocalFileHandler lFileHandler 
)
static

Send message.

◆ WaitForResponse()

template<class Type >
static XrdCl::XRootDStatus XrdCl::MessageUtils::WaitForResponse ( SyncResponseHandler handler,
Type *&  response 
)
inlinestatic

◆ WaitForStatus()

static XRootDStatus XrdCl::MessageUtils::WaitForStatus ( SyncResponseHandler handler)
inlinestatic

Wait and return the status of the query.

References XrdCl::SyncResponseHandler::GetStatus(), and XrdCl::SyncResponseHandler::WaitForResponse().


The documentation for this class was generated from the following file: