25 #ifndef __XRD_CL_MESSAGE_UTILS_HH__ 26 #define __XRD_CL_MESSAGE_UTILS_HH__ 36 class LocalFileHandler;
182 resp->
Get( response );
183 resp->
Set( (
int *)0 );
196 template<
class Request>
199 uint32_t payloadSize = 0 )
201 msg =
new Message(
sizeof(Request) + payloadSize );
243 const std::string &newPath );
266 std::vector<char> &avec );
275 std::vector<char> &nvec );
286 const std::vector<T> &vec,
287 const std::string &path =
"" )
291 std::vector<char> xattrvec;
297 hdr->
dlen = path.size() + 1;
298 hdr->
dlen += xattrvec.size();
302 msg->
Append( path.c_str(), path.size() + 1, offset );
303 offset += path.size() + 1;
304 msg->
Append( xattrvec.data(), xattrvec.size(), offset );
311 #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:970
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:154
virtual void HandleResponseWithHosts(XrdCl::XRootDStatus *status, XrdCl::AnyObject *response, XrdCl::HostList *hostList)
Definition: XrdClMessageUtils.hh:120
const char * GetBuffer(uint32_t offset=0) const
Get the message buffer.
Definition: XrdClBuffer.hh:72
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:167
static Status CreateXAttrVec(const std::vector< xattr_t > &attrs, std::vector< char > &avec)
bool IsOK() const
We're fine.
Definition: XrdClStatus.hh:122
static void MergeCGI(URL::ParamsMap &cgi1, const URL::ParamsMap &cgi2, bool replace)
Procedure execution status.
Definition: XrdClStatus.hh:112
SyncResponseHandler & operator=(const SyncResponseHandler &other)
XrdSys::KernelBuffer * kbuff
Definition: XrdClMessageUtils.hh:145
Definition: XrdClMessageUtils.hh:148
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:1023
std::vector< HostInfo > HostList
Definition: XrdClXRootDResponses.hh:1035
Definition: XrdSysPthread.hh:78
void Set(Type object, bool own=true)
Definition: XrdClAnyObject.hh:59
kXR_int32 dlen
Definition: XProtocol.hh:158
const uint16_t stError
An error occurred that could potentially be retried.
Definition: XrdClStatus.hh:32
Request status.
Definition: XrdClXRootDResponses.hh:218
Definition: XrdClAnyObject.hh:25
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:154
void Broadcast()
Definition: XrdSysPthread.hh:89
Definition: XrdSysPthread.hh:129
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:1040
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:285
AnyObject * pResponse
Definition: XrdClMessageUtils.hh:106
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:197