25#ifndef __XRD_CL_MESSAGE_UTILS_HH__
26#define __XRD_CL_MESSAGE_UTILS_HH__
35 class LocalFileHandler;
178 resp->
Get( response );
179 resp->
Set( (
int *)0 );
192 template<
class Request>
195 uint32_t payloadSize = 0 )
197 msg =
new Message(
sizeof(Request) + payloadSize );
239 const std::string &newPath );
Definition: XrdClAnyObject.hh:33
void Set(Type object, bool own=true)
Definition: XrdClAnyObject.hh:59
void Get(Type &object)
Retrieve the object being held.
Definition: XrdClAnyObject.hh:78
void Zero()
Zero.
Definition: XrdClBuffer.hh:124
const char * GetBuffer(uint32_t offset=0) const
Get the message buffer.
Definition: XrdClBuffer.hh:72
Definition: XrdClLocalFileHandler.hh:33
Definition: XrdClMessageUtils.hh:145
static void RewriteCGIAndPath(Message *msg, const URL::ParamsMap &newCgi, bool replace, const std::string &newPath)
static void ProcessSendParams(MessageSendParams &sendParams)
Process sending params.
static void MergeCGI(URL::ParamsMap &cgi1, const URL::ParamsMap &cgi2, bool replace)
static XrdCl::XRootDStatus WaitForResponse(SyncResponseHandler *handler, Type *&response)
Wait for the response.
Definition: XrdClMessageUtils.hh:163
static Status SendMessage(const URL &url, Message *msg, ResponseHandler *handler, const MessageSendParams &sendParams, LocalFileHandler *lFileHandler)
Send message.
static Status RedirectMessage(const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams, LocalFileHandler *lFileHandler)
Redirect message.
static void CreateRequest(Message *&msg, Request *&req, uint32_t payloadSize=0)
Create a message.
Definition: XrdClMessageUtils.hh:193
static XRootDStatus WaitForStatus(SyncResponseHandler *handler)
Wait and return the status of the query.
Definition: XrdClMessageUtils.hh:150
The message representation used throughout the system.
Definition: XrdClMessage.hh:30
Definition: XrdClMessageUtils.hh:112
virtual void HandleResponseWithHosts(XrdCl::XRootDStatus *status, XrdCl::AnyObject *response, XrdCl::HostList *hostList)
Definition: XrdClMessageUtils.hh:117
Handle an async response.
Definition: XrdClXRootDResponses.hh:855
Synchronize the response.
Definition: XrdClMessageUtils.hh:41
AnyObject * GetResponse()
Get the response.
Definition: XrdClMessageUtils.hh:82
virtual void HandleResponse(XRootDStatus *status, AnyObject *response)
Handle the response.
Definition: XrdClMessageUtils.hh:62
virtual ~SyncResponseHandler()
Destructor.
Definition: XrdClMessageUtils.hh:54
AnyObject * pResponse
Definition: XrdClMessageUtils.hh:103
XRootDStatus * GetStatus()
Get the status.
Definition: XrdClMessageUtils.hh:74
SyncResponseHandler()
Constructor.
Definition: XrdClMessageUtils.hh:46
XRootDStatus * pStatus
Definition: XrdClMessageUtils.hh:102
XrdSysCondVar pCondVar
Definition: XrdClMessageUtils.hh:104
void WaitForResponse()
Wait for the arrival of the response.
Definition: XrdClMessageUtils.hh:90
SyncResponseHandler(const SyncResponseHandler &other)
SyncResponseHandler & operator=(const SyncResponseHandler &other)
URL representation.
Definition: XrdClURL.hh:31
std::map< std::string, std::string > ParamsMap
Definition: XrdClURL.hh:33
Request status.
Definition: XrdClXRootDResponses.hh:213
Definition: XrdSysPthread.hh:130
Definition: XrdSysPthread.hh:79
void Broadcast()
Definition: XrdSysPthread.hh:89
Definition: XrdClAnyObject.hh:26
const uint16_t stError
An error occurred that could potentially be retried.
Definition: XrdClStatus.hh:32
std::vector< HostInfo > HostList
Definition: XrdClXRootDResponses.hh:849
const uint16_t errInternal
Internal error.
Definition: XrdClStatus.hh:55
std::vector< ChunkInfo > ChunkList
List of chunks.
Definition: XrdClXRootDResponses.hh:784
Definition: XrdClXRootDResponses.hh:838
Definition: XrdClMessageUtils.hh:129
HostList * hostList
Definition: XrdClMessageUtils.hh:139
bool stateful
Definition: XrdClMessageUtils.hh:138
uint16_t timeout
Definition: XrdClMessageUtils.hh:133
HostInfo loadBalancer
Definition: XrdClMessageUtils.hh:135
ChunkList * chunkList
Definition: XrdClMessageUtils.hh:140
time_t expires
Definition: XrdClMessageUtils.hh:134
uint16_t redirectLimit
Definition: XrdClMessageUtils.hh:141
bool chunkedResponse
Definition: XrdClMessageUtils.hh:137
MessageSendParams()
Definition: XrdClMessageUtils.hh:130
bool followRedirects
Definition: XrdClMessageUtils.hh:136
Procedure execution status.
Definition: XrdClStatus.hh:110
bool IsOK() const
We're fine.
Definition: XrdClStatus.hh:119