org.flexiblepower.messaging
public static interface ConnectionManager.PotentialConnection
ConnectionManager.EndpointPort
mmatch with their Port.sends()
and Port.accepts()
definitions. This is bidirectional, so it is not possible to ask for 'from' or 'to'.Modifier and Type | Method and Description |
---|---|
void |
connect()
Tries to make the connection.
|
void |
disconnect()
Tries to remove the connection.
|
ConnectionManager.EndpointPort |
getEitherEnd() |
ConnectionManager.EndpointPort |
getOtherEnd(ConnectionManager.EndpointPort either) |
boolean |
isConnectable() |
boolean |
isConnected() |
ConnectionManager.EndpointPort getEitherEnd()
ConnectionManager.EndpointPort
s.ConnectionManager.EndpointPort getOtherEnd(ConnectionManager.EndpointPort either)
either
- The Endpoint
which is not needed.ConnectionManager.EndpointPort
. If you call pc.getOtherEnd(pc.getEitherEnd())
, you
always get the second possible EndpointPort.boolean isConnected()
true
when the real Connection
has been setup. false
otherwise.void connect()
Endpoint.onConnect(Connection)
method with a newly
created Connection
.
Does nothing if already connected or if it is not connectabble.void disconnect()
MessageHandler.disconnected()
on both sides and
invalidates the Connection
. After this call has been made, both Endpoints will continue handling
messages that were still in the queue.
Does nothing if already disconnected.boolean isConnectable()
true
if this connection can be setup. This means that neither end has a
Cardinality.SINGLE
port that is already connected to an other ConnectionManager.EndpointPort
.