|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ConnectionManager
Interface implemented by classes that support message channel connectivity via some I/O pathway (e.g., TCP/IP, etc.). The expectation, though it is not expressible by the semantics of Java's 'interface' abstraction, is that classes implementing this interface will be singletons; that is, one and only one instance of a given ConnectionManager class will be created.
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
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 listener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||