|
XRootD
|
#include <XrdClPostMasterInterfaces.hh>
Inheritance diagram for XrdCl::MsgHandler:
Collaboration diagram for XrdCl::MsgHandler:Public Types | |
| enum | Action { None = 0x0000 , Nop = 0x0001 , Ignore = 0x0002 , RemoveHandler = 0x0004 , Raw = 0x0008 , NoProcess = 0x0010 , Corrupted = 0x0020 , More = 0x0040 } |
| Actions to be taken after a message is processed by the handler. More... | |
| enum | StreamEvent { Ready = 1 , Broken = 2 , Timeout = 3 , FatalError = 4 } |
| Events that may have occurred to the stream. More... | |
Public Member Functions | |
| virtual | ~MsgHandler () |
| Event types that the message handler may receive. | |
| virtual uint16_t | Examine (std::shared_ptr< Message > &msg)=0 |
| virtual time_t | GetExpiration ()=0 |
| virtual uint16_t | GetSid () const =0 |
| virtual uint16_t | InspectStatusRsp ()=0 |
| virtual bool | IsRaw () const |
| virtual void | OnReadyToSend (Message *msg) |
| virtual void | OnStatusReady (const Message *message, XRootDStatus status)=0 |
| The requested action has been performed and the status is available. | |
| virtual uint8_t | OnStreamEvent (StreamEvent event, XRootDStatus status) |
| virtual void | Process () |
| virtual XRootDStatus | ReadMessageBody (Message *msg, Socket *socket, uint32_t &bytesRead) |
| virtual XRootDStatus | WriteMessageBody (Socket *socket, uint32_t &bytesWritten) |
Message handler.
Definition at line 50 of file XrdClPostMasterInterfaces.hh.
Actions to be taken after a message is processed by the handler.
Definition at line 56 of file XrdClPostMasterInterfaces.hh.
Events that may have occurred to the stream.
| Enumerator | |
|---|---|
| Ready | The stream has become connected. |
| Broken | The stream is broken. |
| Timeout | The declared timeout has occurred. |
| FatalError | Stream has been broken and won't be recovered. |
Definition at line 78 of file XrdClPostMasterInterfaces.hh.
|
inlinevirtual |
Event types that the message handler may receive.
Definition at line 90 of file XrdClPostMasterInterfaces.hh.
|
pure virtual |
Examine an incoming message, and decide on the action to be taken
| msg | the message, may be zero if receive failed |
Implemented in XrdCl::XRootDMsgHandler.
Referenced by XrdCl::InQueue::GetHandlerForMessage(), and XrdCl::RedirectJob::Run().
Here is the caller graph for this function:
|
pure virtual |
Implemented in XrdCl::XRootDMsgHandler.
Referenced by XrdCl::InQueue::AssignTimeout(), and XrdCl::InQueue::GetHandlerForMessage().
Here is the caller graph for this function:
|
pure virtual |
Get handler sid
return sid of the corresponding request, otherwise 0
Implemented in XrdCl::XRootDMsgHandler.
Referenced by XrdCl::InQueue::AddMessageHandler(), XrdCl::InQueue::AssignTimeout(), XrdCl::InQueue::ReAddMessageHandler(), and XrdCl::InQueue::RemoveMessageHandler().
Here is the caller graph for this function:
|
pure virtual |
Reexamine the incoming message, and decide on the action to be taken
In case of kXR_status the message can be only fully examined after reading the whole body (without raw data).
| msg | the message, may be zero if receive failed |
Implemented in XrdCl::XRootDMsgHandler.
Referenced by XrdCl::Stream::InspectStatusRsp().
Here is the caller graph for this function:
|
inlinevirtual |
Determines whether the handler wants to write some data directly to the socket after the message (or message header) has been sent, WriteMessageBody will be called
Reimplemented in XrdCl::XRootDMsgHandler.
Definition at line 184 of file XrdClPostMasterInterfaces.hh.
Referenced by XrdCl::AsyncMsgWriter::Write().
Here is the caller graph for this function:
|
inlinevirtual |
Called just before the message is going to be sent through a valid connection, so that the user can still make some modifications that were impossible before (ie. protocol version dependent adjustments)
| msg | message concerned |
Reimplemented in XrdCl::XRootDMsgHandler.
Definition at line 174 of file XrdClPostMasterInterfaces.hh.
Referenced by XrdCl::Stream::OnReadyToWrite().
Here is the caller graph for this function:
|
pure virtual |
The requested action has been performed and the status is available.
Implemented in XrdCl::XRootDMsgHandler.
Referenced by XrdCl::Stream::OnMessageSent().
Here is the caller graph for this function:
|
inlinevirtual |
Handle an event other that a message arrival
| event | type of the event |
| status | status info |
Reimplemented in XrdCl::XRootDMsgHandler.
Definition at line 153 of file XrdClPostMasterInterfaces.hh.
|
inlinevirtual |
Process the message if it was "taken" by the examine action
| msg | the message to be processed |
Reimplemented in XrdCl::XRootDMsgHandler.
Definition at line 125 of file XrdClPostMasterInterfaces.hh.
Referenced by XrdCl::RedirectJob::Run().
Here is the caller graph for this function:
|
inlinevirtual |
Read message body directly from a socket - called if Examine returns Raw flag - only socket related errors may be returned here
| msg | the corresponding message header |
| socket | the socket to read from |
| bytesRead | number of bytes read by the method |
Reimplemented in XrdCl::XRootDMsgHandler.
Definition at line 138 of file XrdClPostMasterInterfaces.hh.
References XrdCl::stOK, and XrdCl::suDone.
Referenced by XrdCl::AsyncMsgReader::Read().
Here is the caller graph for this function:
|
inlinevirtual |
Write message body directly to a socket - called if IsRaw returns true - only socket related errors may be returned here
| socket | the socket to read from |
| bytesWritten | number of bytes written by the method |
Reimplemented in XrdCl::XRootDMsgHandler.
Definition at line 196 of file XrdClPostMasterInterfaces.hh.
Referenced by XrdCl::AsyncMsgWriter::Write().
Here is the caller graph for this function: