Library: RemotingNG
Package: Transport
Header: Poco/RemotingNG/TransportFactoryManager.h
A TransportFactoryManager manages TransportFactory objects.
Member Functions: createTransport, hasFactory, instance, registerFactory, unregisterFactory
Destroys the TransportFactoryManager.
Transport * createTransport(
const std::string & protocol
);
Creates a new Transport for the given protocol.
The newly created Transport is unconnected.
Throws an exception if the protocol is unknown
Transport * createTransport(
const std::string & protocol,
const std::string & uri
);
Creates a new Transport for the given protocol and connects it to the endpoint specified by the given URI.
Throws an exception if the protocol is unknown.
bool hasFactory(
const std::string & protocol
) const;
Returns true if for the protocol a factory was registered.
static TransportFactoryManager & instance();
Returns a reference to the one and only instance of TransportFactoryManager.
void registerFactory(
const std::string & protocol,
TransportFactory::Ptr pFactory
);
Registers the factory if it doesn't exist yet.
void unregisterFactory(
const std::string & protocol
);
Removes the factory from the manager. If for the given protocol no factory is found, the error is silently ignored.