Loading...
Searching...
No Matches
XrdCl::TransportHandler Class Referenceabstract

Perform the handshake and the authentication for each physical stream. More...

`#include <XrdClPostMasterInterfaces.hh>`

Inheritance diagram for XrdCl::TransportHandler:
Collaboration diagram for XrdCl::TransportHandler:

## Public Types

enum | StreamAction { NoAction = 0x0000 , DigestMsg = 0x0001 , AbortStream = 0x0002 , CloseStream = 0x0004 , ResumeStream = 0x0008 , HoldStream = 0x0010 , RequestClose = 0x0020 }
| Stream actions that may be triggered by incoming control messages. More...

## Public Member Functions

virtual | ~TransportHandler ()
virtual void | DecFileInstCnt (AnyObject &channelData)=0
| Decrement file object instance count bound to this channel.
virtual void | Disconnect (AnyObject &channelData, uint16_t subStreamId)=0
| The stream has been disconnected, do the cleanups.
virtual void | FinalizeChannel (AnyObject &channelData)=0
| Finalize channel.
virtual URL | GetBindPreference (const URL &url, AnyObject &channelData)=0
| Get bind preference for the next data stream.
virtual XRootDStatus | GetBody (Message &message, Socket *socket)=0
virtual XRootDStatus | GetHeader (Message &message, Socket *socket)=0
virtual XRootDStatus | GetMore (Message &message, Socket *socket)=0
virtual Status | GetSignature (Message *toSign, Message *&sign, AnyObject &channelData)=0
| Get signature for given message.
virtual XRootDStatus | HandShake (HandShakeData *handShakeData, AnyObject &channelData)=0
| HandHake.
virtual bool | HandShakeDone (HandShakeData *handShakeData, AnyObject &channelData)=0
virtual void | InitializeChannel (const URL &url, AnyObject &channelData)=0
| Initialize channel.
virtual Status | IsStreamBroken (time_t inactiveTime, AnyObject &channelData)=0
virtual bool | IsStreamTTLElapsed (time_t inactiveTime, AnyObject &channelData)=0
| Check if the stream should be disconnected.
virtual uint32_t | MessageReceived (Message &msg, uint16_t subStream, AnyObject &channelData)=0
| Check if the message invokes a stream action.
virtual void | MessageSent (Message *msg, uint16_t subStream, uint32_t bytesSent, AnyObject &channelData)=0
| Notify the transport about a message having been sent.
virtual PathID | Multiplex (Message *msg, AnyObject &channelData, PathID *hint=0)=0
virtual PathID | MultiplexSubStream (Message *msg, AnyObject &channelData, PathID *hint=0)=0
virtual bool | NeedEncryption (HandShakeData *handShakeData, AnyObject &channelData)=0
virtual Status | Query (uint16_t query, AnyObject &result, AnyObject &channelData)=0
| Query the channel.
virtual uint16_t | SubStreamNumber (AnyObject &channelData)=0
| Return a number of substreams per stream that should be created.
virtual void | WaitBeforeExit ()=0
| Wait before exit.

## Detailed Description

Perform the handshake and the authentication for each physical stream.

Definition at line 309 of file XrdClPostMasterInterfaces.hh.

## Member Enumeration Documentation

## StreamAction

enum XrdCl::TransportHandler::StreamAction

Stream actions that may be triggered by incoming control messages.

Enumerator
NoAction | No action.
DigestMsg | Digest the incoming message so that it won't be passed to the user handlers
AbortStream | Disconnect, abort all the on-going operations and mark the stream as permanently broken [not yet implemented]
CloseStream | Disconnect and attempt reconnection later [not yet implemented]
ResumeStream | Resume sending requests [not yet implemented]
HoldStream | Stop sending requests [not yet implemented].
RequestClose | Send a close request.

Definition at line 316 of file XrdClPostMasterInterfaces.hh.

{
NoAction = 0x0000,
DigestMsg = 0x0001,
AbortStream = 0x0002,
CloseStream = 0x0004,
ResumeStream = 0x0008,
HoldStream = 0x0010,
RequestClose = 0x0020
};
XrdCl::TransportHandler::NoAction
@ NoAction
No action.
Definition XrdClPostMasterInterfaces.hh:318
XrdCl::TransportHandler::DigestMsg
@ DigestMsg
Definition XrdClPostMasterInterfaces.hh:319
XrdCl::TransportHandler::RequestClose
@ RequestClose
Send a close request.
Definition XrdClPostMasterInterfaces.hh:329
XrdCl::TransportHandler::AbortStream
@ AbortStream
Definition XrdClPostMasterInterfaces.hh:321
XrdCl::TransportHandler::HoldStream
@ HoldStream
Stop sending requests [not yet implemented].
Definition XrdClPostMasterInterfaces.hh:328
XrdCl::TransportHandler::CloseStream
@ CloseStream
Definition XrdClPostMasterInterfaces.hh:324
XrdCl::TransportHandler::ResumeStream
@ ResumeStream
Definition XrdClPostMasterInterfaces.hh:326

## Constructor & Destructor Documentation

## ~TransportHandler()

virtual XrdCl::TransportHandler::~TransportHandler | ( |  | ) |

inline virtual

Definition at line 333 of file XrdClPostMasterInterfaces.hh.

{}

## Member Function Documentation

## DecFileInstCnt()

virtual void XrdCl::TransportHandler::DecFileInstCnt | ( | AnyObject & | channelData | ) |

pure virtual

Decrement file object instance count bound to this channel.

Implemented in XrdCl::XRootDTransport.

## Disconnect()

virtual void XrdCl::TransportHandler::Disconnect | ( | AnyObject & | channelData,
|  | uint16_t | subStreamId )

pure virtual

The stream has been disconnected, do the cleanups.

Implemented in XrdCl::XRootDTransport.

## FinalizeChannel()

virtual void XrdCl::TransportHandler::FinalizeChannel | ( | AnyObject & | channelData | ) |

pure virtual

Finalize channel.

Implemented in XrdCl::XRootDTransport.

## GetBindPreference()

virtual URL XrdCl::TransportHandler::GetBindPreference | ( | const URL & | url,
|  | AnyObject & | channelData )

pure virtual

Get bind preference for the next data stream.

Implemented in XrdCl::XRootDTransport.

## GetBody()

virtual XRootDStatus XrdCl::TransportHandler::GetBody | ( | Message & | message,
|  | Socket * | socket )

pure virtual

Read the message body from the socket, the socket is non-blocking, the method may be called multiple times - see GetHeader for details

Parameters

  message | the message buffer containing the header
  socket | the socket

Returns
  stOK & suDone if the whole message has been processed stOK & suRetry if more data is needed stError on failure

Implemented in XrdCl::XRootDTransport.

## GetHeader()

virtual XRootDStatus XrdCl::TransportHandler::GetHeader | ( | Message & | message,
|  | Socket * | socket )

pure virtual

Read a message header from the socket, the socket is non-blocking, so if there is not enough data the function should return errRetry in which case it will be called again when more data arrives, with the data previously read stored in the message buffer

Parameters

  message | the message buffer
  socket | the socket

Returns
  stOK & suDone if the whole message has been processed stOK & suRetry if more data is needed stError on failure

Implemented in XrdCl::XRootDTransport.

## GetMore()

virtual XRootDStatus XrdCl::TransportHandler::GetMore | ( | Message & | message,
|  | Socket * | socket )

pure virtual

Read more of the message body from the socket, the socket is non-blocking the method may be called multiple times - see GetHeader for details

Parameters

  message | the message buffer containing the header
  socket | the socket

Returns
  stOK & suDone if the whole message has been processed stOK & suRetry if more data is needed stError on failure

Implemented in XrdCl::XRootDTransport.

## GetSignature()

virtual Status XrdCl::TransportHandler::GetSignature | ( | Message * | toSign,
|  | Message *& | sign,
|  | AnyObject & | channelData )

pure virtual

Get signature for given message.

Implemented in XrdCl::XRootDTransport.

## HandShake()

virtual XRootDStatus XrdCl::TransportHandler::HandShake | ( | HandShakeData * | handShakeData,
|  | AnyObject & | channelData )

pure virtual

HandHake.

Implemented in XrdCl::XRootDTransport.

## HandShakeDone()

virtual bool XrdCl::TransportHandler::HandShakeDone | ( | HandShakeData * | handShakeData,
|  | AnyObject & | channelData )

pure virtual

Implemented in XrdCl::XRootDTransport.

## InitializeChannel()

virtual void XrdCl::TransportHandler::InitializeChannel | ( | const URL & | url,
|  | AnyObject & | channelData )

pure virtual

Initialize channel.

Implemented in XrdCl::XRootDTransport.

## IsStreamBroken()

virtual Status XrdCl::TransportHandler::IsStreamBroken | ( | time_t | inactiveTime,
|  | AnyObject & | channelData )

pure virtual

Check the stream is broken - ie. TCP connection got broken and went undetected by the TCP stack

Implemented in XrdCl::XRootDTransport.

## IsStreamTTLElapsed()

virtual bool XrdCl::TransportHandler::IsStreamTTLElapsed | ( | time_t | inactiveTime,
|  | AnyObject & | channelData )

pure virtual

Check if the stream should be disconnected.

Implemented in XrdCl::XRootDTransport.

## MessageReceived()

virtual uint32_t XrdCl::TransportHandler::MessageReceived | ( | Message & | msg,
|  | uint16_t | subStream,
|  | AnyObject & | channelData )

pure virtual

Check if the message invokes a stream action.

Implemented in XrdCl::XRootDTransport.

## MessageSent()

virtual void XrdCl::TransportHandler::MessageSent | ( | Message * | msg,
|  | uint16_t | subStream,
|  | uint32_t | bytesSent,
|  | AnyObject & | channelData )

pure virtual

Notify the transport about a message having been sent.

Implemented in XrdCl::XRootDTransport.

## Multiplex()

virtual PathID XrdCl::TransportHandler::Multiplex | ( | Message * | msg,
|  | AnyObject & | channelData,
|  | PathID * | hint = 0 )

pure virtual

Return the ID for the up stream this message should be sent by and the down stream which the answer should be expected at. Modify the message itself if necessary. If hint is non-zero then the message should be modified such that the answer will be returned via the hinted stream.

Implemented in XrdCl::XRootDTransport.

## MultiplexSubStream()

virtual PathID XrdCl::TransportHandler::MultiplexSubStream | ( | Message * | msg,
|  | AnyObject & | channelData,
|  | PathID * | hint = 0 )

pure virtual

Return the ID for the up substream this message should be sent by and the down substream which the answer should be expected at. Modify the message itself if necessary. If hint is non-zero then the message should be modified such that the answer will be returned via the hinted stream.

Implemented in XrdCl::XRootDTransport.

## NeedEncryption()

virtual bool XrdCl::TransportHandler::NeedEncryption | ( | HandShakeData * | handShakeData,
|  | AnyObject & | channelData )

pure virtual

Returns
  : true if encryption should be turned on, false otherwise

Implemented in XrdCl::XRootDTransport.

## Query()

virtual Status XrdCl::TransportHandler::Query | ( | uint16_t | query,
|  | AnyObject & | result,
|  | AnyObject & | channelData )

pure virtual

Query the channel.

Implemented in XrdCl::XRootDTransport.

## SubStreamNumber()

virtual uint16_t XrdCl::TransportHandler::SubStreamNumber | ( | AnyObject & | channelData | ) |

pure virtual

Return a number of substreams per stream that should be created.

Implemented in XrdCl::XRootDTransport.

## WaitBeforeExit()

virtual void XrdCl::TransportHandler::WaitBeforeExit | ( |  | ) |

pure virtual

Wait before exit.

Implemented in XrdCl::XRootDTransport.

Referenced by XrdCl::PluginUnloadHandler::UnloadHandler().

Here is the caller graph for this function:

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

- XrdClPostMasterInterfaces.hh