xrootd
Public Types | Public Member Functions | List of all members
XrdCl::IncomingMsgHandler Class Referenceabstract

Message handler. More...

#include <XrdClPostMasterInterfaces.hh>

Inheritance diagram for XrdCl::IncomingMsgHandler:
Inheritance graph
[legend]

Public Types

enum  Action { Take = 0x01, Ignore = 0x02, RemoveHandler = 0x04 }
 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 occured to the stream. More...
 

Public Member Functions

virtual ~IncomingMsgHandler ()
 Event types that the message handler may receive. More...
 
virtual uint8_t OnIncoming (Message *msg)=0
 
virtual uint8_t OnStreamEvent (StreamEvent event, uint16_t streamNum, Status status)
 

Detailed Description

Message handler.

Member Enumeration Documentation

Actions to be taken after a message is processed by the handler.

Enumerator
Take 

Take ownership over the message.

Ignore 

Ignore the message.

RemoveHandler 

Remove the handler from the notification list

Events that may have occured to the stream.

Enumerator
Ready 

The stream has become connected.

Broken 

The stream is broken.

Timeout 

The declared timeout has occured.

FatalError 

Stream has been broken and won't be recovered.

Constructor & Destructor Documentation

virtual XrdCl::IncomingMsgHandler::~IncomingMsgHandler ( )
inlinevirtual

Event types that the message handler may receive.

Member Function Documentation

virtual uint8_t XrdCl::IncomingMsgHandler::OnIncoming ( Message *  msg)
pure virtual

Examine an incomming message, and decide on the action to be taken

Parameters
msgthe message, may be zero if receive failed
Returns
action type that needs to be take wrt the message and the handler

Implemented in XrdCl::XRootDMsgHandler.

Referenced by XrdCl::InQueue::AddMessageHandler().

virtual uint8_t XrdCl::IncomingMsgHandler::OnStreamEvent ( StreamEvent  event,
uint16_t  streamNum,
Status  status 
)
inlinevirtual

Handle an event other that a message arrival

Parameters
eventtype of the event
streamNumstream concerned
statusstatus info
Returns
Action::RemoveHandler or 0

Reimplemented in XrdCl::XRootDMsgHandler.


The documentation for this class was generated from the following file: