25 #ifndef __XRD_CL_MESSAGE_UTILS_HH__
26 #define __XRD_CL_MESSAGE_UTILS_HH__
36 class LocalFileHandler;
183 resp->
Get( response );
184 resp->
Set( (
int *)0 );
197 template<
class Request>
200 uint32_t payloadSize = 0 )
202 msg =
new Message(
sizeof(Request) + payloadSize );
244 const std::string &newPath );
267 std::vector<char> &avec );
276 std::vector<char> &nvec );
287 const std::vector<T> &vec,
288 const std::string &path =
"" )
292 std::vector<char> xattrvec;
298 hdr->
dlen = path.size() + 1;
299 hdr->
dlen += xattrvec.size();
303 msg->
Append( path.c_str(), path.size() + 1, offset );
304 offset += path.size() + 1;
305 msg->
Append( xattrvec.data(), xattrvec.size(), offset );
312 #endif // __XRD_CL_MESSAGE_UTILS_HH__
Definition: XrdClMessageUtils.hh:114
Definition: XrdClAnyObject.hh:32
std::map< std::string, std::string > ParamsMap
Definition: XrdClURL.hh:33
Definition: XrdClMessageUtils.hh:131
uint16_t redirectLimit
Definition: XrdClMessageUtils.hh:144
std::vector< ChunkInfo > ChunkList
List of chunks.
Definition: XrdClXRootDResponses.hh:1046
XRootDStatus * GetStatus()
Get the status.
Definition: XrdClMessageUtils.hh:77
void Get(Type &object)
Retrieve the object being held.
Definition: XrdClAnyObject.hh:78
The message representation used throughout the system.
Definition: XrdClMessage.hh:29
static XRootDStatus WaitForStatus(SyncResponseHandler *handler)
Wait and return the status of the query.
Definition: XrdClMessageUtils.hh:155
virtual void HandleResponseWithHosts(XrdCl::XRootDStatus *status, XrdCl::AnyObject *response, XrdCl::HostList *hostList)
Definition: XrdClMessageUtils.hh:120
bool followRedirects
Definition: XrdClMessageUtils.hh:139
bool chunkedResponse
Definition: XrdClMessageUtils.hh:140
uint16_t timeout
Definition: XrdClMessageUtils.hh:136
Synchronize the response.
Definition: XrdClMessageUtils.hh:43
SyncResponseHandler()
Constructor.
Definition: XrdClMessageUtils.hh:49
static XRootDStatus SendMessage(const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams, LocalFileHandler *lFileHandler)
Send message.
static XrdCl::XRootDStatus WaitForResponse(SyncResponseHandler *handler, Type *&response)
Wait for the response.
Definition: XrdClMessageUtils.hh:168
static Status CreateXAttrVec(const std::vector< xattr_t > &attrs, std::vector< char > &avec)
static void MergeCGI(URL::ParamsMap &cgi1, const URL::ParamsMap &cgi2, bool replace)
const char * GetBuffer(uint32_t offset=0) const
Get the message buffer.
Definition: XrdClBuffer.hh:72
Procedure execution status.
Definition: XrdClStatus.hh:113
SyncResponseHandler & operator=(const SyncResponseHandler &other)
XrdSys::KernelBuffer * kbuff
Definition: XrdClMessageUtils.hh:145
Definition: XrdClMessageUtils.hh:149
virtual ~SyncResponseHandler()
Destructor.
Definition: XrdClMessageUtils.hh:57
AnyObject * GetResponse()
Get the response.
Definition: XrdClMessageUtils.hh:85
static void RewriteCGIAndPath(Message *msg, const URL::ParamsMap &newCgi, bool replace, const std::string &newPath)
Definition: XrdClXRootDResponses.hh:1099
std::vector< HostInfo > HostList
Definition: XrdClXRootDResponses.hh:1111
Definition: XrdSysPthread.hh:78
void Set(Type object, bool own=true)
Definition: XrdClAnyObject.hh:59
kXR_int32 dlen
Definition: XProtocol.hh:159
const uint16_t stError
An error occurred that could potentially be retried.
Definition: XrdClStatus.hh:32
Request status.
Definition: XrdClXRootDResponses.hh:218
ChunkList * chunkList
Definition: XrdClMessageUtils.hh:143
HostList * hostList
Definition: XrdClMessageUtils.hh:142
void WaitForResponse()
Wait for the arrival of the response.
Definition: XrdClMessageUtils.hh:93
HostInfo loadBalancer
Definition: XrdClMessageUtils.hh:138
Definition: XrdSysKernelBuffer.hh:45
Definition: XProtocol.hh:155
void Broadcast()
Definition: XrdSysPthread.hh:89
Definition: XrdSysPthread.hh:128
void Append(const char *buffer, uint32_t size)
Append data at the position pointed to by the append cursor.
Definition: XrdClBuffer.hh:164
MessageSendParams()
Definition: XrdClMessageUtils.hh:133
bool stateful
Definition: XrdClMessageUtils.hh:141
Handle an async response.
Definition: XrdClXRootDResponses.hh:1116
std::vector< uint32_t > crc32cDigests
Definition: XrdClMessageUtils.hh:146
Definition: XrdClLocalFileHandler.hh:32
URL representation.
Definition: XrdClURL.hh:30
time_t expires
Definition: XrdClMessageUtils.hh:137
const uint16_t errInternal
Internal error.
Definition: XrdClStatus.hh:56
static Status CreateXAttrBody(Message *msg, const std::vector< T > &vec, const std::string &path="")
Definition: XrdClMessageUtils.hh:286
AnyObject * pResponse
Definition: XrdClMessageUtils.hh:106
bool IsOK() const
We're fine.
Definition: XrdClStatus.hh:123
XrdSysCondVar pCondVar
Definition: XrdClMessageUtils.hh:107
XRootDStatus * pStatus
Definition: XrdClMessageUtils.hh:105
static void ProcessSendParams(MessageSendParams &sendParams)
Process sending params.
void Zero()
Zero.
Definition: XrdClBuffer.hh:124
static Status RedirectMessage(const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams, LocalFileHandler *lFileHandler)
Redirect message.
virtual void HandleResponse(XRootDStatus *status, AnyObject *response)
Handle the response.
Definition: XrdClMessageUtils.hh:65
static void CreateRequest(Message *&msg, Request *&req, uint32_t payloadSize=0)
Create a message.
Definition: XrdClMessageUtils.hh:198