|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.mobilityrpc.network.impl.ConnectionManagerImpl
public class ConnectionManagerImpl
| Constructor Summary | |
|---|---|
ConnectionManagerImpl(MobilityControllerImpl mobilityController)
|
|
| 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. |
void |
destroy()
Destroys (closes/shuts down) the resource(s) managed by the object, closing connections, stopping threads etc. |
Connection |
getConnection(ConnectionId identifier)
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 |
init()
Does nothing in the current implementation. |
boolean |
isConnectionRegistered(ConnectionId connectionId)
|
void |
notifyConnectionClosed(ConnectionInternal connection)
Called when the supplied connection has been closed. |
void |
notifyConnectionOpened(ConnectionInternal connection)
Called when the supplied connection has been opened. |
void |
unbindConnectionListener(ConnectionId localEndpointIdentifier)
Closes a listener on the local machine which was previously opened via the ConnectionManager.bindConnectionListener(ConnectionId) method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionManagerImpl(MobilityControllerImpl mobilityController)
| Method Detail |
|---|
public Connection getConnection(ConnectionId identifier)
ConnectionManager
getConnection in interface ConnectionManageridentifier - Identifies a remote machine (address and port) to which a connection is required
public void notifyConnectionOpened(ConnectionInternal connection)
ConnectionStateListener
notifyConnectionOpened in interface ConnectionStateListenerconnection - The connection which has been openedpublic void notifyConnectionClosed(ConnectionInternal connection)
ConnectionStateListener
notifyConnectionClosed in interface ConnectionStateListenerconnection - The connection which has been closedpublic boolean isConnectionRegistered(ConnectionId connectionId)
isConnectionRegistered in interface ConnectionStateListenerconnectionId - The connection id to check
public void bindConnectionListener(ConnectionId localEndpointIdentifier)
ConnectionManagerlocalhost 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.
bindConnectionListener in interface ConnectionManagerlocalEndpointIdentifier - Identifies an address and port on the local machinepublic void unbindConnectionListener(ConnectionId localEndpointIdentifier)
ConnectionManagerConnectionManager.bindConnectionListener(ConnectionId) method.
unbindConnectionListener in interface ConnectionManagerlocalEndpointIdentifier - The localEndpointIdentifier previously used to bind the connectionpublic Collection<ConnectionId> getConnectionListenerIdentifiers()
ConnectionManagerConnectionIds for the currently bound listeners.
getConnectionListenerIdentifiers in interface ConnectionManagerConnectionIds for the currently bound listenerspublic Collection<ConnectionId> getConnectionIds()
ConnectionManagerConnectionIds for the currently open connections.
getConnectionIds in interface ConnectionManagerConnectionIds for the currently open connectionspublic void init()
init in interface Initializablepublic void destroy()
Destroyable
destroy in interface Destroyable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||