Go to the documentation of this file.
25 #ifndef __XRD_CL_MESSAGE_UTILS_HH__
26 #define __XRD_CL_MESSAGE_UTILS_HH__
35 class LocalFileHandler;
180 resp->
Get( response );
181 resp->
Set( (
int *)0 );
194 template<
class Request>
197 uint32_t payloadSize = 0 )
199 msg =
new Message(
sizeof(Request) + payloadSize );
241 const std::string &newPath );
264 std::vector<char> &avec );
273 std::vector<char> &nvec );
284 const std::vector<T> &vec,
285 const std::string &path =
"" )
289 std::vector<char> xattrvec;
295 hdr->
dlen = path.size() + 1;
296 hdr->
dlen += xattrvec.size();
300 msg->
Append( path.c_str(), path.size() + 1, offset );
301 offset += path.size() + 1;
302 msg->
Append( xattrvec.data(), xattrvec.size(), offset );
309 #endif // __XRD_CL_MESSAGE_UTILS_HH__
uint16_t timeout
Definition: XrdClMessageUtils.hh:135
Definition: XrdClMessageUtils.hh:131
Definition: XProtocol.hh:148
Handle an async response.
Definition: XrdClXRootDResponses.hh:975
void WaitForResponse()
Wait for the arrival of the response.
Definition: XrdClMessageUtils.hh:92
AnyObject * pResponse
Definition: XrdClMessageUtils.hh:105
XRootDStatus * pStatus
Definition: XrdClMessageUtils.hh:104
Definition: XrdClLocalFileHandler.hh:33
Definition: XrdSysPthread.hh:130
const char * GetBuffer(uint32_t offset=0) const
Get the message buffer.
Definition: XrdClBuffer.hh:72
bool followRedirects
Definition: XrdClMessageUtils.hh:138
void Get(Type &object)
Retrieve the object being held.
Definition: XrdClAnyObject.hh:78
time_t expires
Definition: XrdClMessageUtils.hh:136
void Set(Type object, bool own=true)
Definition: XrdClAnyObject.hh:59
const uint16_t errInternal
Internal error.
Definition: XrdClStatus.hh:55
Synchronize the response.
Definition: XrdClMessageUtils.hh:43
The message representation used throughout the system.
Definition: XrdClMessage.hh:30
HostInfo loadBalancer
Definition: XrdClMessageUtils.hh:137
uint16_t redirectLimit
Definition: XrdClMessageUtils.hh:143
void Broadcast()
Definition: XrdSysPthread.hh:89
kXR_int32 dlen
Definition: XProtocol.hh:152
static void ProcessSendParams(MessageSendParams &sendParams)
Process sending params.
Request status.
Definition: XrdClXRootDResponses.hh:215
static XRootDStatus WaitForStatus(SyncResponseHandler *handler)
Wait and return the status of the query.
Definition: XrdClMessageUtils.hh:152
static Status RedirectMessage(const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams, LocalFileHandler *lFileHandler)
Redirect message.
Definition: XrdSysPthread.hh:79
std::vector< ChunkInfo > ChunkList
List of chunks.
Definition: XrdClXRootDResponses.hh:904
static Status CreateXAttrBody(Message *msg, const std::vector< T > &vec, const std::string &path="")
Definition: XrdClMessageUtils.hh:283
std::map< std::string, std::string > ParamsMap
Definition: XrdClURL.hh:33
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)
Definition: XrdClMessageUtils.hh:147
static void CreateRequest(Message *&msg, Request *&req, uint32_t payloadSize=0)
Create a message.
Definition: XrdClMessageUtils.hh:195
ChunkList * chunkList
Definition: XrdClMessageUtils.hh:142
static Status CreateXAttrVec(const std::vector< xattr_t > &attrs, std::vector< char > &avec)
bool stateful
Definition: XrdClMessageUtils.hh:140
HostList * hostList
Definition: XrdClMessageUtils.hh:141
SyncResponseHandler(const SyncResponseHandler &other)
bool IsOK() const
We're fine.
Definition: XrdClStatus.hh:120
XrdSysCondVar pCondVar
Definition: XrdClMessageUtils.hh:106
XRootDStatus * GetStatus()
Get the status.
Definition: XrdClMessageUtils.hh:76
virtual void HandleResponse(XRootDStatus *status, AnyObject *response)
Handle the response.
Definition: XrdClMessageUtils.hh:64
Definition: XrdClMessageUtils.hh:114
static XRootDStatus SendMessage(const URL &url, Message *msg, ResponseHandler *handler, const MessageSendParams &sendParams, LocalFileHandler *lFileHandler)
Send message.
void Append(const char *buffer, uint32_t size)
Append data at the position pointed to by the append cursor.
Definition: XrdClBuffer.hh:164
Definition: XrdClAnyObject.hh:26
bool chunkedResponse
Definition: XrdClMessageUtils.hh:139
std::vector< HostInfo > HostList
Definition: XrdClXRootDResponses.hh:969
virtual ~SyncResponseHandler()
Destructor.
Definition: XrdClMessageUtils.hh:56
MessageSendParams()
Definition: XrdClMessageUtils.hh:132
static Status CreateXAttrVec(const std::vector< std::string > &attrs, std::vector< char > &nvec)
const uint16_t stError
An error occurred that could potentially be retried.
Definition: XrdClStatus.hh:32
static XrdCl::XRootDStatus WaitForResponse(SyncResponseHandler *handler, Type *&response)
Wait for the response.
Definition: XrdClMessageUtils.hh:165
Definition: XrdClXRootDResponses.hh:958
Procedure execution status.
Definition: XrdClStatus.hh:111
URL representation.
Definition: XrdClURL.hh:31
SyncResponseHandler()
Constructor.
Definition: XrdClMessageUtils.hh:48
void Zero()
Zero.
Definition: XrdClBuffer.hh:124
SyncResponseHandler & operator=(const SyncResponseHandler &other)
virtual void HandleResponseWithHosts(XrdCl::XRootDStatus *status, XrdCl::AnyObject *response, XrdCl::HostList *hostList)
Definition: XrdClMessageUtils.hh:119
Definition: XrdClAnyObject.hh:33
AnyObject * GetResponse()
Get the response.
Definition: XrdClMessageUtils.hh:84