xrootd
|
#include <XrdClPostMasterInterfaces.hh>
Public Types | |
enum | Action { None = 0x0000, Take = 0x0001, Ignore = 0x0002, RemoveHandler = 0x0004, Raw = 0x0008, NoProcess = 0x0010, Corrupted = 0x0020 } |
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 | ~IncomingMsgHandler () |
Event types that the message handler may receive. More... | |
virtual uint16_t | Examine (Message *msg)=0 |
virtual uint16_t | InspectStatusRsp (Message *msg)=0 |
virtual uint16_t | GetSid () const =0 |
virtual void | Process (Message *msg) |
virtual Status | ReadMessageBody (Message *msg, Socket *socket, uint32_t &bytesRead) |
virtual uint8_t | OnStreamEvent (StreamEvent event, XRootDStatus status) |
Message handler.
Actions to be taken after a message is processed by the handler.
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. |
|
inlinevirtual |
Event types that the message handler may receive.
|
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.
|
pure virtual |
Get handler sid
return sid of the corresponding request, otherwise 0
Implemented in XrdCl::XRootDMsgHandler.
|
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.
|
inlinevirtual |
Handle an event other that a message arrival
event | type of the event |
status | status info |
Reimplemented in XrdCl::XRootDMsgHandler.
|
inlinevirtual |
Process the message if it was "taken" by the examine action
msg | the message to be processed |
Reimplemented in XrdCl::XRootDMsgHandler.
Referenced by XrdCl::Stream::HandleIncMsgJob::Run().
|
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.
References XrdCl::stOK, and XrdCl::suDone.