org.flexiblepower.messaging
public interface Connection
This object is created by the ConnectionManager
when two Endpoint
s are connected. It will then be
provided to them through the Endpoint.onConnect(Connection)
method.
This interface should never be implemented by users
Modifier and Type | Method and Description |
---|---|
Port |
getPort() |
void |
sendMessage(java.lang.Object message)
Sends a message to the other
Endpoint . |
void sendMessage(java.lang.Object message)
Endpoint
. This message is handled asynchronously, so it will be handled by
the other Endpoint
on a seperate thread.
Only messages of the type as defined in the Port.sends()
should be sent.message
- The message that is to be sent.