A hub for dispatching and receiving messages.
More...
#include <XrdClPostMaster.hh>
|
| | PostMaster () |
| | Constructor. More...
|
| |
| virtual | ~PostMaster () |
| | Destructor. More...
|
| |
| bool | Initialize () |
| | Initializer. More...
|
| |
| bool | Finalize () |
| | Finalizer. More...
|
| |
| bool | Start () |
| | Start the post master. More...
|
| |
| bool | Stop () |
| | Stop the postmaster. More...
|
| |
| bool | Reinitialize () |
| | Reinitialize after fork. More...
|
| |
| XRootDStatus | Send (const URL &url, Message *msg, bool stateful, time_t expires) |
| |
| XRootDStatus | Send (const URL &url, Message *msg, OutgoingMsgHandler *handler, bool stateful, time_t expires) |
| |
| Status | Redirect (const URL &url, Message *msg, IncomingMsgHandler *handler) |
| |
| Status | Receive (const URL &url, Message *&msg, MessageFilter *filter, time_t expires) |
| |
| Status | Receive (const URL &url, IncomingMsgHandler *handler, time_t expires) |
| |
| Status | QueryTransport (const URL &url, uint16_t query, AnyObject &result) |
| |
| Status | RegisterEventHandler (const URL &url, ChannelEventHandler *handler) |
| | Register channel event handler. More...
|
| |
| Status | RemoveEventHandler (const URL &url, ChannelEventHandler *handler) |
| | Remove a channel event handler. More...
|
| |
| TaskManager * | GetTaskManager () |
| | Get the task manager object user by the post master. More...
|
| |
| JobManager * | GetJobManager () |
| | Get the job manager object user by the post master. More...
|
| |
| Status | ForceDisconnect (const URL &url) |
| | Shut down a channel. More...
|
| |
| uint16_t | NbConnectedStrm (const URL &url) |
| | Get the number of connected data streams. More...
|
| |
| void | SetOnDataConnectHandler (const URL &url, std::shared_ptr< Job > onConnJob) |
| | Set the on-connect handler for data streams. More...
|
| |
| void | SetOnConnectHandler (std::unique_ptr< Job > onConnJob) |
| | Set the global on-connect handler for control streams. More...
|
| |
| void | NotifyConnectHandler (const URL &url) |
| | Notify the global on-connect handler. More...
|
| |
|
| std::unique_ptr< PostMasterImpl > | pImpl |
| |
A hub for dispatching and receiving messages.
◆ PostMaster()
| XrdCl::PostMaster::PostMaster |
( |
| ) |
|
◆ ~PostMaster()
| virtual XrdCl::PostMaster::~PostMaster |
( |
| ) |
|
|
virtual |
◆ Finalize()
| bool XrdCl::PostMaster::Finalize |
( |
| ) |
|
◆ ForceDisconnect()
| Status XrdCl::PostMaster::ForceDisconnect |
( |
const URL & |
url | ) |
|
◆ GetChannel()
| Channel* XrdCl::PostMaster::GetChannel |
( |
const URL & |
url | ) |
|
|
private |
◆ GetJobManager()
Get the job manager object user by the post master.
◆ GetTaskManager()
Get the task manager object user by the post master.
◆ Initialize()
| bool XrdCl::PostMaster::Initialize |
( |
| ) |
|
◆ NbConnectedStrm()
| uint16_t XrdCl::PostMaster::NbConnectedStrm |
( |
const URL & |
url | ) |
|
Get the number of connected data streams.
◆ NotifyConnectHandler()
| void XrdCl::PostMaster::NotifyConnectHandler |
( |
const URL & |
url | ) |
|
Notify the global on-connect handler.
◆ QueryTransport()
| Status XrdCl::PostMaster::QueryTransport |
( |
const URL & |
url, |
|
|
uint16_t |
query, |
|
|
AnyObject & |
result |
|
) |
| |
Query the transport handler for a given URL
- Parameters
-
| url | the channel to be queried |
| query | the query as defined in the TransportQuery struct or others that may be recognized by the protocol transport |
| result | the result of the query |
- Returns
- status of the query
◆ Receive() [1/2]
Listen to incoming messages, the listener is notified when a new message arrives and when the timeout passes
- Parameters
-
| url | sender of the message |
| handler | handler to be notified about new messages |
| expires | expiration timestamp |
- Returns
- success when the listener has been inserted correctly
◆ Receive() [2/2]
Synchronously receive a message - blocks until a message matching a filter is found in the incoming queue or the timeout passes
- Parameters
-
| url | sender of the message |
| msg | reference to a message pointer, the pointer will point to the received message |
| filter | filter object defining what to look for |
| expires | expiration timestamp |
- Returns
- success when the message has been received successfully, failure otherwise
◆ Redirect()
◆ RegisterEventHandler()
Register channel event handler.
◆ Reinitialize()
| bool XrdCl::PostMaster::Reinitialize |
( |
| ) |
|
◆ RemoveEventHandler()
Remove a channel event handler.
◆ Send() [1/2]
Send a message synchronously - synchronously means that it will block until the message is written to a socket
DEADLOCK WARNING: no lock should be taken while calling this method that are used in the callback as well.
- Parameters
-
| url | recipient of the message |
| msg | message to be sent |
| stateful | physical stream disconnection causes an error |
| expires | unix timestamp after which a failure should be reported if sending was unsuccessful |
- Returns
- success if the message has been pushed through the wire, failure otherwise
◆ Send() [2/2]
Send the message asynchronously - the message is inserted into the send queue and a listener is called when the message is succesfsully pushed through the wire or when the timeout elapses
DEADLOCK WARNING: no lock should be taken while calling this method that are used in the callback as well.
- Parameters
-
| url | recipient of the message |
| msg | message to be sent |
| expires | unix timestamp after which a failure is reported to the handler |
| handler | handler will be notified about the status |
| stateful | physical stream disconnection causes an error |
- Returns
- success if the message was successfully inserted into the send queues, failure otherwise
◆ SetOnConnectHandler()
| void XrdCl::PostMaster::SetOnConnectHandler |
( |
std::unique_ptr< Job > |
onConnJob | ) |
|
Set the global on-connect handler for control streams.
◆ SetOnDataConnectHandler()
| void XrdCl::PostMaster::SetOnDataConnectHandler |
( |
const URL & |
url, |
|
|
std::shared_ptr< Job > |
onConnJob |
|
) |
| |
Set the on-connect handler for data streams.
◆ Start()
| bool XrdCl::PostMaster::Start |
( |
| ) |
|
◆ Stop()
| bool XrdCl::PostMaster::Stop |
( |
| ) |
|
◆ pImpl
| std::unique_ptr<PostMasterImpl> XrdCl::PostMaster::pImpl |
|
private |
The documentation for this class was generated from the following file: