xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
XrdClXRootDMsgHandler.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // Copyright (c) 2011-2014 by European Organization for Nuclear Research (CERN)
3 // Author: Lukasz Janyst <ljanyst@cern.ch>
4 //------------------------------------------------------------------------------
5 // This file is part of the XRootD software suite.
6 //
7 // XRootD is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Lesser General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // XRootD is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with XRootD. If not, see <http://www.gnu.org/licenses/>.
19 //
20 // In applying this licence, CERN does not waive the privileges and immunities
21 // granted to it by virtue of its status as an Intergovernmental Organization
22 // or submit itself to any jurisdiction.
23 //------------------------------------------------------------------------------
24 
25 #ifndef __XRD_CL_XROOTD_MSG_HANDLER_HH__
26 #define __XRD_CL_XROOTD_MSG_HANDLER_HH__
27 
30 #include "XrdCl/XrdClDefaultEnv.hh"
31 #include "XrdCl/XrdClMessage.hh"
32 #include "XProtocol/XProtocol.hh"
33 #include "XrdCl/XrdClLog.hh"
34 #include "XrdCl/XrdClConstants.hh"
35 
36 #include "XrdSys/XrdSysPthread.hh"
37 
38 #include <sys/uio.h>
39 
40 #include <list>
41 #include <memory>
42 
43 #if __cplusplus >= 201103L
44 #include <atomic>
45 #endif
46 
47 namespace XrdCl
48 {
49  class PostMaster;
50  class SIDManager;
51  class URL;
52  class LocalFileHandler;
53 
54  //----------------------------------------------------------------------------
55  // Single entry in the redirect-trace-back
56  //----------------------------------------------------------------------------
58  {
59  enum Type
60  {
65  };
66 
67  RedirectEntry( const URL &from, const URL &to, Type type ) :
68  from( from ), to( to ), type( type )
69  {
70 
71  }
72 
77 
78  std::string ToString( bool prevok = true )
79  {
80  const std::string tostr = to.GetLocation();
81  const std::string fromstr = from.GetLocation();
82 
83  if( prevok )
84  {
85  switch( type )
86  {
87  case EntryRedirect: return "Redirected from: " + fromstr + " to: "
88  + tostr;
89 
90  case EntryRedirectOnWait: return "Server responded with wait. "
91  "Falling back to virtual redirector: " + tostr;
92 
93  case EntryRetry: return "Retrying: " + tostr;
94 
95  case EntryWait: return "Waited at server request. Resending: "
96  + tostr;
97  }
98  }
99  return "Failed at: " + fromstr + ", retrying at: " + tostr;
100  }
101  };
102 
103  //----------------------------------------------------------------------------
105  //----------------------------------------------------------------------------
107  public OutgoingMsgHandler
108  {
109  friend class HandleRspJob;
110 
111  public:
112  //------------------------------------------------------------------------
121  //------------------------------------------------------------------------
123  ResponseHandler *respHandler,
124  const URL *url,
125  SIDManager *sidMgr,
126  LocalFileHandler *lFileHandler):
127  pRequest( msg ),
128  pResponse( 0 ),
129  pResponseHandler( respHandler ),
130  pUrl( *url ),
132  pSidMgr( sidMgr ),
133  pLFileHandler( lFileHandler ),
134  pExpiration( 0 ),
135  pRedirectAsAnswer( false ),
136  pOksofarAsAnswer( false ),
137  pHosts( 0 ),
138  pHasLoadBalancer( false ),
139  pHasSessionId( false ),
140  pChunkList( 0 ),
141  pRedirectCounter( 0 ),
143 
144  pAsyncOffset( 0 ),
145  pAsyncReadSize( 0 ),
146  pAsyncReadBuffer( 0 ),
147  pAsyncMsgSize( 0 ),
148 
149  pReadRawStarted( false ),
151 
152  pReadVRawMsgOffset( 0 ),
153  pReadVRawChunkHeaderDone( false ),
155  pReadVRawSizeError( false ),
156  pReadVRawChunkIndex( 0 ),
157  pReadVRawMsgDiscard( false ),
158 
159  pOtherRawStarted( false ),
160 
161  pFollowMetalink( false ),
162 
163  pStateful( false ),
164 
165  pAggregatedWaitTime( 0 ),
166 
167  pMsgInFly( false ),
168 
169  pTimeoutFence( false ),
170 
171  pDirListStarted( false ),
172  pDirListWithStat( false ),
173 
174  pCV( 0 )
175 
176  {
178  if( msg->GetSessionId() )
179  pHasSessionId = true;
180  memset( &pReadVRawChunkHeader, 0, sizeof( readahead_list ) );
181 
182  Log *log = DefaultEnv::GetLog();
183  log->Debug( ExDbgMsg, "[%s] MsgHandler created: 0x%x (message: %s ).",
184  pUrl.GetHostId().c_str(), this,
185  pRequest->GetDescription().c_str() );
186  }
187 
188  //------------------------------------------------------------------------
190  //------------------------------------------------------------------------
192  {
194 
195  if( !pHasSessionId )
196  delete pRequest;
197  delete pResponse;
198  std::vector<Message *>::iterator it;
199  for( it = pPartialResps.begin(); it != pPartialResps.end(); ++it )
200  delete *it;
201 
203 
204  pRequest = reinterpret_cast<Message*>( 0xDEADBEEF );
205  pResponse = reinterpret_cast<Message*>( 0xDEADBEEF );
206  pResponseHandler = reinterpret_cast<ResponseHandler*>( 0xDEADBEEF );
207  pPostMaster = reinterpret_cast<PostMaster*>( 0xDEADBEEF );
208  pSidMgr = reinterpret_cast<SIDManager*>( 0xDEADBEEF );
209  pLFileHandler = reinterpret_cast<LocalFileHandler*>( 0xDEADBEEF );
210  pHosts = reinterpret_cast<HostList*>( 0xDEADBEEF );
211  pChunkList = reinterpret_cast<ChunkList*>( 0xDEADBEEF );
212  pEffectiveDataServerUrl = reinterpret_cast<URL*>( 0xDEADBEEF );
213 
214  Log *log = DefaultEnv::GetLog();
215  log->Debug( ExDbgMsg, "[%s] Destroying MsgHandler: 0x%x.",
216  pUrl.GetHostId().c_str(), this );
217  }
218 
219  //------------------------------------------------------------------------
225  //------------------------------------------------------------------------
226  virtual uint16_t Examine( Message *msg );
227 
228  //------------------------------------------------------------------------
232  //------------------------------------------------------------------------
233  virtual uint16_t GetSid() const;
234 
235  //------------------------------------------------------------------------
239  //------------------------------------------------------------------------
240  virtual void Process( Message *msg );
241 
242  //------------------------------------------------------------------------
252  //------------------------------------------------------------------------
253  virtual Status ReadMessageBody( Message *msg,
254  int socket,
255  uint32_t &bytesRead );
256 
257  //------------------------------------------------------------------------
263  //------------------------------------------------------------------------
264  virtual uint8_t OnStreamEvent( StreamEvent event,
265  uint16_t streamNum,
266  Status status );
267 
268  //------------------------------------------------------------------------
270  //------------------------------------------------------------------------
271  virtual void OnStatusReady( const Message *message,
272  Status status );
273 
274  //------------------------------------------------------------------------
276  //------------------------------------------------------------------------
277  virtual bool IsRaw() const;
278 
279  //------------------------------------------------------------------------
288  //------------------------------------------------------------------------
289  Status WriteMessageBody( int socket,
290  uint32_t &bytesRead );
291 
292  //------------------------------------------------------------------------
297  //------------------------------------------------------------------------
298  ChunkList* GetMessageBody( uint32_t *&asyncOffset )
299  {
300  asyncOffset = &pAsyncOffset;
301  return pChunkList;
302  }
303 
304  //------------------------------------------------------------------------
308  //------------------------------------------------------------------------
309  void WaitDone( time_t now );
310 
311  //------------------------------------------------------------------------
313  //------------------------------------------------------------------------
314  void SetExpiration( time_t expiration )
315  {
316  pExpiration = expiration;
317  }
318 
319  //------------------------------------------------------------------------
322  //------------------------------------------------------------------------
323  void SetRedirectAsAnswer( bool redirectAsAnswer )
324  {
325  pRedirectAsAnswer = redirectAsAnswer;
326  }
327 
328  //------------------------------------------------------------------------
331  //------------------------------------------------------------------------
332  void SetOksofarAsAnswer( bool oksofarAsAnswer )
333  {
334  pOksofarAsAnswer = oksofarAsAnswer;
335  }
336 
337  //------------------------------------------------------------------------
339  //------------------------------------------------------------------------
340  const Message *GetRequest() const
341  {
342  return pRequest;
343  }
344 
345  //------------------------------------------------------------------------
347  //------------------------------------------------------------------------
348  void SetLoadBalancer( const HostInfo &loadBalancer )
349  {
350  if( !loadBalancer.url.IsValid() )
351  return;
352  pLoadBalancer = loadBalancer;
353  pHasLoadBalancer = true;
354  }
355 
356  //------------------------------------------------------------------------
358  //------------------------------------------------------------------------
359  void SetHostList( HostList *hostList )
360  {
361  delete pHosts;
362  pHosts = hostList;
363  }
364 
365  //------------------------------------------------------------------------
367  //------------------------------------------------------------------------
368  void SetChunkList( ChunkList *chunkList )
369  {
370  pChunkList = chunkList;
371  if( chunkList )
372  pChunkStatus.resize( chunkList->size() );
373  else
374  pChunkStatus.clear();
375  }
376 
377  //------------------------------------------------------------------------
379  //------------------------------------------------------------------------
380  void SetRedirectCounter( uint16_t redirectCounter )
381  {
382  pRedirectCounter = redirectCounter;
383  }
384 
385  void SetFollowMetalink( bool followMetalink )
386  {
387  pFollowMetalink = followMetalink;
388  }
389 
390  void SetStateful( bool stateful )
391  {
392  pStateful = stateful;
393  }
394 
395  //------------------------------------------------------------------------
397  //------------------------------------------------------------------------
398  void TakeDownTimeoutFence();
399 
400  private:
401  //------------------------------------------------------------------------
403  //------------------------------------------------------------------------
404  Status ReadRawRead( Message *msg,
405  int socket,
406  uint32_t &bytesRead );
407 
408  //------------------------------------------------------------------------
410  //------------------------------------------------------------------------
412  int socket,
413  uint32_t &bytesRead );
414 
415  //------------------------------------------------------------------------
417  //------------------------------------------------------------------------
419  int socket,
420  uint32_t &bytesRead );
421 
422  //------------------------------------------------------------------------
425  //------------------------------------------------------------------------
426  Status ReadAsync( int socket, uint32_t &btesRead );
427 
428  //------------------------------------------------------------------------
430  //------------------------------------------------------------------------
431  void HandleError( Status status, Message *msg = 0 );
432 
433  //------------------------------------------------------------------------
435  //------------------------------------------------------------------------
436  Status RetryAtServer( const URL &url, RedirectEntry::Type entryType );
437 
438  //------------------------------------------------------------------------
440  //------------------------------------------------------------------------
441  void HandleResponse();
442 
443  //------------------------------------------------------------------------
445  //------------------------------------------------------------------------
447 
448  //------------------------------------------------------------------------
451  //------------------------------------------------------------------------
452  Status ParseResponse( AnyObject *&response );
453 
454  //------------------------------------------------------------------------
457  //------------------------------------------------------------------------
458  Status RewriteRequestRedirect( const URL &newUrl );
459 
460  //------------------------------------------------------------------------
462  //------------------------------------------------------------------------
464 
465  //------------------------------------------------------------------------
467  //------------------------------------------------------------------------
468  Status PostProcessReadV( VectorReadInfo *vReadInfo );
469 
470  //------------------------------------------------------------------------
472  //------------------------------------------------------------------------
474 
475  //------------------------------------------------------------------------
477  //------------------------------------------------------------------------
478  void UpdateTriedCGI(uint32_t errNo=0);
479 
480  //------------------------------------------------------------------------
482  //------------------------------------------------------------------------
483  void SwitchOnRefreshFlag();
484 
485  //------------------------------------------------------------------------
488  //------------------------------------------------------------------------
489  void HandleRspOrQueue();
490 
491  //------------------------------------------------------------------------
493  //------------------------------------------------------------------------
494  void HandleLocalRedirect( URL *url );
495 
496  //------------------------------------------------------------------------
501  //------------------------------------------------------------------------
502  bool IsRetriable( Message *request );
503 
504  //------------------------------------------------------------------------
511  //------------------------------------------------------------------------
512  bool OmitWait( Message *request, const URL &url );
513 
514  //------------------------------------------------------------------------
520  //------------------------------------------------------------------------
521  bool RetriableErrorResponse( const Status &status );
522 
523  //------------------------------------------------------------------------
525  //------------------------------------------------------------------------
526  void DumpRedirectTraceBack();
527 
528  //------------------------------------------------------------------------
529  // Helper struct for async reading of chunks
530  //------------------------------------------------------------------------
531  struct ChunkStatus
532  {
533  ChunkStatus(): sizeError( false ), done( false ) {}
534  bool sizeError;
535  bool done;
536  };
537 
538  typedef std::list<std::unique_ptr<RedirectEntry>> RedirectTraceBack;
539 
542  std::vector<Message *> pPartialResps;
551  time_t pExpiration;
558  std::string pRedirectUrl;
560  std::vector<ChunkStatus> pChunkStatus;
563 
564  uint32_t pAsyncOffset;
565  uint32_t pAsyncReadSize;
567  uint32_t pAsyncMsgSize;
568 
571 
579 
581 
583 
584  bool pStateful;
586 
587  std::unique_ptr<RedirectEntry> pRdirEntry;
589 
590  bool pMsgInFly;
591 
592  //------------------------------------------------------------------------
593  // true if MsgHandler is both in inQueue and installed in respective
594  // Stream (this could happen if server gave oksofar response), otherwise
595  // false
596  //------------------------------------------------------------------------
597 #if __cplusplus >= 201103L
598  std::atomic<bool> pTimeoutFence;
599 #else
601 #endif
602 
603  //------------------------------------------------------------------------
604  // if we are serving chunked data to the user's handler in case of
605  // kXR_dirlist we need to memorize if the response contains stat info or
606  // not (the information is only encoded in the first chunk)
607  //------------------------------------------------------------------------
610 
611  //------------------------------------------------------------------------
612  // synchronization is needed in case the MsgHandler has been configured
613  // to serve kXR_oksofar as a response to the user's handler
614  //------------------------------------------------------------------------
616  };
617 }
618 
619 #endif // __XRD_CL_XROOTD_MSG_HANDLER_HH__
bool pOtherRawStarted
Definition: XrdClXRootDMsgHandler.hh:580
std::vector< Message * > pPartialResps
Definition: XrdClXRootDMsgHandler.hh:542
Definition: XrdClAnyObject.hh:32
URL to
Definition: XrdClXRootDMsgHandler.hh:74
const std::string & GetDescription() const
Get the description of the message.
Definition: XrdClMessage.hh:74
void UpdateTriedCGI(uint32_t errNo=0)
Update the &quot;tried=&quot; part of the CGI of the current message.
const uint64_t ExDbgMsg
Definition: XrdClConstants.hh:41
std::vector< ChunkInfo > ChunkList
List of chunks.
Definition: XrdClXRootDResponses.hh:784
Status RetryAtServer(const URL &url, RedirectEntry::Type entryType)
Retry the request at another server.
PostMaster * pPostMaster
Definition: XrdClXRootDMsgHandler.hh:546
virtual bool IsRaw() const
Are we a raw writer or not?
Status RewriteRequestWait()
Some requests need to be rewritten also after getting kXR_wait - sigh.
Definition: XProtocol.hh:663
The message representation used throughout the system.
Definition: XrdClMessage.hh:29
std::string GetLocation() const
Get location (protocol://host:port/path)
ChunkStatus()
Definition: XrdClXRootDMsgHandler.hh:533
bool RetriableErrorResponse(const Status &status)
bool IsValid() const
Is the url valid.
void SetRedirectCounter(uint16_t redirectCounter)
Set the redirect counter.
Definition: XrdClXRootDMsgHandler.hh:380
bool pReadRawStarted
Definition: XrdClXRootDMsgHandler.hh:569
~XRootDMsgHandler()
Destructor.
Definition: XrdClXRootDMsgHandler.hh:191
void SetFollowMetalink(bool followMetalink)
Definition: XrdClXRootDMsgHandler.hh:385
RedirectTraceBack pRedirectTraceBack
Definition: XrdClXRootDMsgHandler.hh:588
URL from
Definition: XrdClXRootDMsgHandler.hh:73
LocalFileHandler * pLFileHandler
Definition: XrdClXRootDMsgHandler.hh:548
uint16_t pNotAuthorizedCounter
Definition: XrdClXRootDMsgHandler.hh:562
std::string ToString(bool prevok=true)
Definition: XrdClXRootDMsgHandler.hh:78
std::vector< ChunkStatus > pChunkStatus
Definition: XrdClXRootDMsgHandler.hh:560
Definition: XrdClXRootDMsgHandler.hh:531
uint32_t pReadVRawMsgOffset
Definition: XrdClXRootDMsgHandler.hh:572
friend class HandleRspJob
Definition: XrdClXRootDMsgHandler.hh:109
bool pReadVRawChunkHeaderDone
Definition: XrdClXRootDMsgHandler.hh:573
Status ParseResponse(AnyObject *&response)
StreamEvent
Events that may have occurred to the stream.
Definition: XrdClPostMasterInterfaces.hh:91
virtual uint16_t GetSid() const
bool pFollowMetalink
Definition: XrdClXRootDMsgHandler.hh:582
bool done
Definition: XrdClXRootDMsgHandler.hh:535
Procedure execution status.
Definition: XrdClStatus.hh:109
Status RewriteRequestRedirect(const URL &newUrl)
URL pUrl
Definition: XrdClXRootDMsgHandler.hh:544
virtual void Process(Message *msg)
Message * pRequest
Definition: XrdClXRootDMsgHandler.hh:540
Status UnPackReadVResponse(Message *msg)
Unpack a single readv response.
Definition: XrdClXRootDMsgHandler.hh:62
time_t pExpiration
Definition: XrdClXRootDMsgHandler.hh:551
void SetExpiration(time_t expiration)
Set a timestamp after which we give up.
Definition: XrdClXRootDMsgHandler.hh:314
uint16_t pRedirectCounter
Definition: XrdClXRootDMsgHandler.hh:561
static Log * GetLog()
Get default log.
XRootDMsgHandler(Message *msg, ResponseHandler *respHandler, const URL *url, SIDManager *sidMgr, LocalFileHandler *lFileHandler)
Definition: XrdClXRootDMsgHandler.hh:122
bool pHasSessionId
Definition: XrdClXRootDMsgHandler.hh:557
ChunkList * pChunkList
Definition: XrdClXRootDMsgHandler.hh:559
Definition: XrdClXRootDResponses.hh:837
char * pAsyncReadBuffer
Definition: XrdClXRootDMsgHandler.hh:566
Status ReadRawReadV(Message *msg, int socket, uint32_t &bytesRead)
Handle a kXR_readv in raw mode.
void HandleError(Status status, Message *msg=0)
Recover error.
std::vector< HostInfo > HostList
Definition: XrdClXRootDResponses.hh:849
virtual uint16_t Examine(Message *msg)
bool pOksofarAsAnswer
Definition: XrdClXRootDMsgHandler.hh:553
SIDManager * pSidMgr
Definition: XrdClXRootDMsgHandler.hh:547
Status ReadRawOther(Message *msg, int socket, uint32_t &bytesRead)
Handle anything other than kXR_read and kXR_readv in raw mode.
bool pDirListWithStat
Definition: XrdClXRootDMsgHandler.hh:609
virtual Status ReadMessageBody(Message *msg, int socket, uint32_t &bytesRead)
std::list< std::unique_ptr< RedirectEntry > > RedirectTraceBack
Definition: XrdClXRootDMsgHandler.hh:538
Definition: XrdSysPthread.hh:78
Status WriteMessageBody(int socket, uint32_t &bytesRead)
bool pReadVRawMsgDiscard
Definition: XrdClXRootDMsgHandler.hh:578
Message * pResponse
Definition: XrdClXRootDMsgHandler.hh:541
RedirectEntry(const URL &from, const URL &to, Type type)
Definition: XrdClXRootDMsgHandler.hh:67
virtual uint8_t OnStreamEvent(StreamEvent event, uint16_t streamNum, Status status)
XRootDStatus status
Definition: XrdClXRootDMsgHandler.hh:76
Request status.
Definition: XrdClXRootDResponses.hh:212
URL * pEffectiveDataServerUrl
Definition: XrdClXRootDMsgHandler.hh:545
Handle XRootD stream IDs.
Definition: XrdClSIDManager.hh:33
void TakeDownTimeoutFence()
Take down the timeout fence after oksofar response has been handled.
Status PostProcessReadV(VectorReadInfo *vReadInfo)
Post process vector read.
Message handler.
Definition: XrdClPostMasterInterfaces.hh:68
std::string GetHostId() const
Get the host part of the URL (user:password@host:port)
Definition: XrdClURL.hh:84
Type type
Definition: XrdClXRootDMsgHandler.hh:75
int pAggregatedWaitTime
Definition: XrdClXRootDMsgHandler.hh:585
ChunkList * GetMessageBody(uint32_t *&asyncOffset)
Definition: XrdClXRootDMsgHandler.hh:298
void SwitchOnRefreshFlag()
Switch on the refresh flag for some requests.
void SetChunkList(ChunkList *chunkList)
Set the chunk list.
Definition: XrdClXRootDMsgHandler.hh:368
bool pDirListStarted
Definition: XrdClXRootDMsgHandler.hh:608
uint64_t GetSessionId() const
Get the session ID the message is meant for.
Definition: XrdClMessage.hh:90
void SetRedirectAsAnswer(bool redirectAsAnswer)
Definition: XrdClXRootDMsgHandler.hh:323
std::string pRedirectUrl
Definition: XrdClXRootDMsgHandler.hh:558
URL url
URL of the host.
Definition: XrdClXRootDResponses.hh:846
bool sizeError
Definition: XrdClXRootDMsgHandler.hh:534
bool pRedirectAsAnswer
Definition: XrdClXRootDMsgHandler.hh:552
bool pStateful
Definition: XrdClXRootDMsgHandler.hh:584
void HandleLocalRedirect(URL *url)
Handle a redirect to a local file.
Vector read info.
Definition: XrdClXRootDResponses.hh:789
const Message * GetRequest() const
Get the request pointer.
Definition: XrdClXRootDMsgHandler.hh:340
Status ReadAsync(int socket, uint32_t &btesRead)
Handle an async response.
Definition: XrdClXRootDResponses.hh:854
void SetStateful(bool stateful)
Definition: XrdClXRootDMsgHandler.hh:390
Definition: XrdClLocalFileHandler.hh:32
uint32_t pAsyncMsgSize
Definition: XrdClXRootDMsgHandler.hh:567
uint32_t pAsyncReadSize
Definition: XrdClXRootDMsgHandler.hh:565
URL representation.
Definition: XrdClURL.hh:30
uint32_t pAsyncOffset
Definition: XrdClXRootDMsgHandler.hh:564
bool OmitWait(Message *request, const URL &url)
Status ReadRawRead(Message *msg, int socket, uint32_t &bytesRead)
Handle a kXR_read in raw mode.
bool pReadVRawSizeError
Definition: XrdClXRootDMsgHandler.hh:575
std::unique_ptr< RedirectEntry > pRdirEntry
Definition: XrdClXRootDMsgHandler.hh:587
HostList * pHosts
Definition: XrdClXRootDMsgHandler.hh:554
int32_t pReadVRawChunkIndex
Definition: XrdClXRootDMsgHandler.hh:576
Definition: XrdClXRootDMsgHandler.hh:61
void WaitDone(time_t now)
XRootDStatus * ProcessStatus()
Extract the status information from the stuff that we got.
Status pLastError
Definition: XrdClXRootDMsgHandler.hh:550
uint32_t pReadRawCurrentOffset
Definition: XrdClXRootDMsgHandler.hh:570
Message status handler.
Definition: XrdClPostMasterInterfaces.hh:167
Definition: XrdClXRootDMsgHandler.hh:64
A hub for dispatching and receiving messages.
Definition: XrdClPostMaster.hh:44
Type
Definition: XrdClXRootDMsgHandler.hh:59
bool pReadVRawChunkHeaderStarted
Definition: XrdClXRootDMsgHandler.hh:574
HostInfo pLoadBalancer
Definition: XrdClXRootDMsgHandler.hh:556
static PostMaster * GetPostMaster()
Get default post master.
Handle/Process/Forward XRootD messages.
Definition: XrdClXRootDMsgHandler.hh:106
XrdSysCondVar pCV
Definition: XrdClXRootDMsgHandler.hh:615
virtual void OnStatusReady(const Message *message, Status status)
The requested action has been performed and the status is available.
bool IsRetriable(Message *request)
void Debug(uint64_t topic, const char *format,...)
Print a debug message.
void HandleResponse()
Unpack the message and call the response handler.
bool pHasLoadBalancer
Definition: XrdClXRootDMsgHandler.hh:555
ResponseHandler * pResponseHandler
Definition: XrdClXRootDMsgHandler.hh:543
Definition: XrdClXRootDMsgHandler.hh:57
Status pStatus
Definition: XrdClXRootDMsgHandler.hh:549
bool pMsgInFly
Definition: XrdClXRootDMsgHandler.hh:590
bool pTimeoutFence
Definition: XrdClXRootDMsgHandler.hh:600
void SetOksofarAsAnswer(bool oksofarAsAnswer)
Definition: XrdClXRootDMsgHandler.hh:332
void DumpRedirectTraceBack()
Dump the redirect-trace-back into the log file.
Handle diagnostics.
Definition: XrdClLog.hh:101
void SetLoadBalancer(const HostInfo &loadBalancer)
Set the load balancer.
Definition: XrdClXRootDMsgHandler.hh:348
Definition: XrdClXRootDMsgHandler.hh:63
readahead_list pReadVRawChunkHeader
Definition: XrdClXRootDMsgHandler.hh:577
void SetHostList(HostList *hostList)
Set host list.
Definition: XrdClXRootDMsgHandler.hh:359