xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
XrdCl::Channel Class Reference

A communication channel between the client and the server. More...

#include <XrdClChannel.hh>

Collaboration diagram for XrdCl::Channel:
Collaboration graph
[legend]

Public Member Functions

 Channel (const URL &url, Poller *poller, TransportHandler *transport, TaskManager *taskManager, JobManager *jobManager, const URL &prefurl=URL())
 
 ~Channel ()
 Destructor. More...
 
const URLGetURL () const
 Get the URL. More...
 
XRootDStatus Send (Message *msg, MsgHandler *handler, bool stateful, time_t expires)
 
Status QueryTransport (uint16_t query, AnyObject &result)
 
void RegisterEventHandler (ChannelEventHandler *handler)
 Register channel event handler. More...
 
void RemoveEventHandler (ChannelEventHandler *handler)
 Remove a channel event handler. More...
 
void Tick (time_t now)
 Handle a time event. More...
 
Status ForceDisconnect ()
 Force disconnect of all streams. More...
 
uint16_t NbConnectedStrm ()
 Get the number of connected data streams. More...
 
void SetOnDataConnectHandler (std::shared_ptr< Job > &onConnJob)
 Set the on-connect handler for data streams. More...
 
bool CanCollapse (const URL &url)
 
void DecFileInstCnt ()
 Decrement file object instance count bound to this channel. More...
 

Private Attributes

URL pUrl
 
PollerpPoller
 
TransportHandlerpTransport
 
TaskManagerpTaskManager
 
StreampStream
 
XrdSysMutex pMutex
 
AnyObject pChannelData
 
InQueue pIncoming
 
TickGeneratorTask * pTickGenerator
 
JobManagerpJobManager
 

Detailed Description

A communication channel between the client and the server.

Constructor & Destructor Documentation

XrdCl::Channel::Channel ( const URL url,
Poller poller,
TransportHandler transport,
TaskManager taskManager,
JobManager jobManager,
const URL prefurl = URL() 
)

Constructor

Parameters
urladdress of the server to connect to
pollerpoller object to be used for non-blocking IO
transportprotocol specific transport handler
taskManagerasync task handler to be used by the channel
jobManagerworker thread handler to be used by the channel
XrdCl::Channel::~Channel ( )

Destructor.

Member Function Documentation

bool XrdCl::Channel::CanCollapse ( const URL url)
Returns
: true if this channel can be collapsed using this URL, false otherwise
void XrdCl::Channel::DecFileInstCnt ( )

Decrement file object instance count bound to this channel.

Status XrdCl::Channel::ForceDisconnect ( )

Force disconnect of all streams.

const URL& XrdCl::Channel::GetURL ( ) const
inline

Get the URL.

References pUrl.

uint16_t XrdCl::Channel::NbConnectedStrm ( )

Get the number of connected data streams.

Status XrdCl::Channel::QueryTransport ( uint16_t  query,
AnyObject result 
)

Query the transport handler

Parameters
querythe query as defined in the TransportQuery struct or others that may be recognized by the protocol transport
resultthe result of the query
Returns
status of the query
void XrdCl::Channel::RegisterEventHandler ( ChannelEventHandler handler)

Register channel event handler.

void XrdCl::Channel::RemoveEventHandler ( ChannelEventHandler handler)

Remove a channel event handler.

XRootDStatus XrdCl::Channel::Send ( Message msg,
MsgHandler handler,
bool  stateful,
time_t  expires 
)

Send the message asynchronously - the message is inserted into the send queue and a listener is called when the message is successfully pushed through the wire or when the timeout elapses

Parameters
msgmessage to be sent stateful physical stream disconnection causes an error
expiresunix timestamp after which a failure is reported to the listener
handlerhandler to be notified about the status
redirectorvirtual redirector to be used
Returns
success if the message was successfully inserted into the send queues, failure otherwise
void XrdCl::Channel::SetOnDataConnectHandler ( std::shared_ptr< Job > &  onConnJob)

Set the on-connect handler for data streams.

void XrdCl::Channel::Tick ( time_t  now)

Handle a time event.

Member Data Documentation

AnyObject XrdCl::Channel::pChannelData
private
InQueue XrdCl::Channel::pIncoming
private
JobManager* XrdCl::Channel::pJobManager
private
XrdSysMutex XrdCl::Channel::pMutex
private
Poller* XrdCl::Channel::pPoller
private
Stream* XrdCl::Channel::pStream
private
TaskManager* XrdCl::Channel::pTaskManager
private
TickGeneratorTask* XrdCl::Channel::pTickGenerator
private
TransportHandler* XrdCl::Channel::pTransport
private
URL XrdCl::Channel::pUrl
private

Referenced by GetURL().


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