public interface ConnectionManager
Modifier and Type | Method and Description |
---|---|
void |
connect(String propRoot,
MessageHandlerFactory handlerFactory,
String hostPort)
Make a connection, using this connection manager's communications
modality, to another host given a host:port address.
|
void |
init(NetworkManager networkManager,
Trace msgTrace)
Initialize this connection manager.
|
NetAddr |
listen(String propRoot,
String listenAddress,
MessageHandlerFactory handlerFactory,
boolean secure)
Begin listening for incoming connections on some port, using this
connection manager's communications modality.
|
void init(NetworkManager networkManager, Trace msgTrace)
networkManager
- The network manager this connection manager will
be managing connections for.msgTrace
- Trace object for logging message traffic.void connect(String propRoot, MessageHandlerFactory handlerFactory, String hostPort)
propRoot
- Prefix string for all the properties describing the
connection that is to be made.handlerFactory
- Message handler factory to provide the handler
for the connection that results from this operation.hostPort
- The host name (or IP address) and port to connect to,
separated by a colon. For example, "bithlo.example.com:8002".NetAddr listen(String propRoot, String listenAddress, MessageHandlerFactory handlerFactory, boolean secure) throws IOException
propRoot
- Prefix string for all the properties describing the
listener that is to be started.listenAddress
- Host name and port to listen for connections on.handlerFactory
- Message handler factory to provide message
handlers for connections made to this port.secure
- If true, use a secure connection pathway (e.g., SSL).IOException
- if there was a problem establishing the listenerCopyright © 2017. All rights reserved.