|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConnectionManager
Keeps track of incoming and outgoing connections to/from remote machines, and controls the opening and closing of server sockets on the local machine to receive incoming connections.
ProvidesbindConnectionListener(ConnectionId) and unbindConnectionListener(ConnectionId) methods
which allow the application to request the library to start and stop listening, respectively, for incoming
connections from remote machines on the specified ports.
Provides a getConnection(ConnectionId) method, which will establish a new connection to the specified
machine if no such connection already exists, or will return an already-established connection if one already
exists. It should be noted that an already-established connection could include an inbound connection received
from the specified machine. Connections are persistent, bi-directional, full-duplex, multiplexed, and responses are
asynchronous and non-blocking; therefore inbound connections are equivalent to outbound ones.
Note that applications are unlikely to call getConnection(ConnectionId) explicitly; connections
are established/reused automatically whenever sessions enqueue objects/messages for sending to remote machines.
The only reason for an application to call this directly, would be if the application wished to establish connections
proactively, for example at startup.
| Method Summary | |
|---|---|
void |
bindConnectionListener(ConnectionId localEndpointIdentifier)
Opens a listener on the local machine to receive inbound connections from other machines to the specified address and port on the local machine. |
Connection |
getConnection(ConnectionId destinationIdentifier)
Returns a connection to the destination specified. |
Collection<ConnectionId> |
getConnectionIds()
Returns the set of ConnectionIds for the currently open connections. |
Collection<ConnectionId> |
getConnectionListenerIdentifiers()
Returns the set of ConnectionIds for the currently bound listeners. |
void |
unbindConnectionListener(ConnectionId localEndpointIdentifier)
Closes a listener on the local machine which was previously opened via the bindConnectionListener(ConnectionId) method. |
| Method Detail |
|---|
Connection getConnection(ConnectionId destinationIdentifier)
destinationIdentifier - Identifies a remote machine (address and port) to which a connection is required
void bindConnectionListener(ConnectionId localEndpointIdentifier)
localhost to receive connections only from other processes on the local
machine, or could be the local machine's IP address or host name on its network.
localEndpointIdentifier - Identifies an address and port on the local machinevoid unbindConnectionListener(ConnectionId localEndpointIdentifier)
bindConnectionListener(ConnectionId) method.
localEndpointIdentifier - The localEndpointIdentifier previously used to bind the connectionCollection<ConnectionId> getConnectionListenerIdentifiers()
ConnectionIds for the currently bound listeners.
ConnectionIds for the currently bound listenersCollection<ConnectionId> getConnectionIds()
ConnectionIds for the currently open connections.
ConnectionIds for the currently open connections
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||