- com
- softwareag
- umtransport
- TransportFactory
The TransportFactory is used to to create ServerTransports or client Transports. To bind a server Transport you need to first create a ServerTransportContext or to connect to an existing server you need to create a ClientTransportContext. More...
#include <TransportFactory.h>
Static Public Member Functions | |
static std::unique_ptr < AsynchronousServerTransport > | bind (std::unique_ptr< ServerTransportContext > context, AcceptHandler *ahandler, DataHandler *dHandler, CloseHandler *cHandler) |
Bind a new ServerTransport as defined by the context. This method takes several callback objects which will be notified asynchronously when certain events occur. More... | |
static std::unique_ptr < SynchronousServerTransport > | bind (std::unique_ptr< ServerTransportContext > context) |
Create a new SynchronousServerTransport using the configuration stored in the ServerTransportContext. This ServerTransport can be used to accept connections. More... | |
static std::unique_ptr < AsynchronousTransport > | connect (std::unique_ptr< ClientTransportContext > context, ConnectHandler *connectHandler, DataHandler *dataHandler, CloseHandler *closeHandler) |
Connect to a ServerTransport using the configuration defined in the ClientTransportContext More... | |
static std::unique_ptr < SynchronousTransport > | connect (std::unique_ptr< ClientTransportContext > context) |
Connect a new SynchronousTransport as defined in the context to a server. More... | |
static bool | TransportSupported (const std::string &transportName) |
This function tests to see if the requested transport is supported on the current hardware. Transports like RDMA require specialised Infiniband cards and drivers to be present. More... | |
The TransportFactory is used to to create ServerTransports or client Transports. To bind a server Transport you need to first create a ServerTransportContext or to connect to an existing server you need to create a ClientTransportContext.
<seealso cref= com.softwareag.um.io.ClientTransportContext
<seealso cref= com.softwareag.um.io.ServerTransportContext
|
static |
Bind a new ServerTransport as defined by the context. This method takes several callback objects which will be notified asynchronously when certain events occur.
context | The ServerTransportContext which defines what type of ServerTransport to create |
ahandler | The AcceptHandler that will be notified when new client Transports connect |
dHandler | The DataHandler that will be notified when data is available to be read from an AsynchronousTranport |
cHandler | The CloseHandler that will be notified when a client Transport is closed |
IOException | if the ServerTransport cannot be bound using the configuration in the context |
|
static |
Create a new SynchronousServerTransport using the configuration stored in the ServerTransportContext. This ServerTransport can be used to accept connections.
context | the configuration to use to create the ServerTransport |
IOException | if the ServerTransport as defined in the context cannot be bound to |
|
static |
Connect to a ServerTransport using the configuration defined in the ClientTransportContext
context | contains the configuration required to connect to the ServerTransport |
connectHandler | notified when the AsynchronousTransport is connected |
dataHandler | notified when data is available to be read from the AsynchronousTransport |
closeHandler | notified when the AsynchronousTransport is closed |
IOException | if there is a problem connecting to the ServerTransport |
|
static |
Connect a new SynchronousTransport as defined in the context to a server.
context | defines the configuration fo the SynchronousTransport |
IOException | if the SynchronousTransport as defined in the context cannot connect to the server |
|
static |
This function tests to see if the requested transport is supported on the current hardware. Transports like RDMA require specialised Infiniband cards and drivers to be present.
transportName | to test |