Loading...
Searching...
No Matches
XrdCl::TransportManager Class Reference

Manage transport handler objects. More...

`#include <XrdClTransportManager.hh>`

Collaboration diagram for XrdCl::TransportManager:

## Public Types

typedef TransportHandler *(* | TransportFactory) ()

## Public Member Functions

| TransportManager ()
| Constructor.
virtual | ~TransportManager ()
TransportHandler * | GetHandler (const std::string &protocol)
| Get a transport handler object for a given protocol.
bool | RegisterFactory (const std::string &protocol, TransportFactory factory)
| Register a transport factory function for a given protocol.

## Detailed Description

Manage transport handler objects.

Definition at line 32 of file XrdClTransportManager.hh.

## Member Typedef Documentation

## TransportFactory

typedef TransportHandler *(* XrdCl::TransportManager::TransportFactory) ()

Definition at line 35 of file XrdClTransportManager.hh.

## Constructor & Destructor Documentation

## TransportManager()

XrdCl::TransportManager::TransportManager | ( |  | ) |

Constructor.

Definition at line 27 of file XrdClTransportManager.cc.

{
pHandlers["root"] = new XRootDTransport();
pHandlers["xroot"] = new XRootDTransport();
pHandlers["roots"] = new XRootDTransport();
pHandlers["xroots"] = new XRootDTransport();
}

## ~TransportManager()

XrdCl::TransportManager::~TransportManager | ( |  | ) |

virtual

Definition at line 38 of file XrdClTransportManager.cc.

{
HandlerMap::iterator it;
for( it = pHandlers.begin(); it != pHandlers.end(); ++it )
delete it->second;
}

## Member Function Documentation

## GetHandler()

TransportHandler * XrdCl::TransportManager::GetHandler | ( | const std::string & | protocol | ) |

Get a transport handler object for a given protocol.

Definition at line 61 of file XrdClTransportManager.cc.

{
HandlerMap::iterator itH = pHandlers.find( protocol );
if( itH != pHandlers.end() )
return itH->second;
FactoryMap::iterator itF = pFactories.find( protocol );
if( itF == pFactories.end() )
return 0;
TransportHandler *handler = (*itF->second)();
pHandlers[protocol] = handler;
return handler;
}

Referenced by XrdCl::PostMaster::CollapseRedirect(), and XrdCl::PluginUnloadHandler::UnloadHandler().

Here is the caller graph for this function:

## RegisterFactory()

bool XrdCl::TransportManager::RegisterFactory | ( | const std::string & | protocol,
|  | TransportFactory | factory )

Register a transport factory function for a given protocol.

Definition at line 48 of file XrdClTransportManager.cc.

{
FactoryMap::iterator it = pFactories.find( protocol );
if( it == pFactories.end() )
return false;
pFactories[protocol] = factory;
return true;
}

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

- XrdClTransportManager.hh
- XrdClTransportManager.cc