public interface NodeConnectionListener
Modifier and Type | Method and Description |
---|---|
void |
connected(NodeConnection remoteCon)
Called when the connection is stabilished.
|
void |
disconnected(NodeConnection remoteCon)
Called when the connection is lost.
|
void |
internalException(NodeConnection remoteCon,
java.lang.Exception e)
Called when a internal exception occurs in the RemoteConnection
implementation.
|
void |
newMessageReceived(NodeConnection remoteCon,
Message message)
Called when the Gateway sends a object.
|
void |
reconnected(NodeConnection remoteCon,
java.net.SocketAddress endPoint,
boolean wasHandover,
boolean wasMandatory)
Method called to inform that the connection was broken but made again.
|
void |
unsentMessages(NodeConnection remoteCon,
java.util.List<Message> unsentMessages)
Called when connection drops and there is unacked sent messages.
|
void connected(NodeConnection remoteCon)
remoteCon
- the RemoteConnection which the event happenedvoid reconnected(NodeConnection remoteCon, java.net.SocketAddress endPoint, boolean wasHandover, boolean wasMandatory)
remoteCon
- the related remote connectionendPoint
- the end point connectedwasHandover
- if a handover was made, ie. if the current end point is
the different than the lastwasMandatory
- is it was a mandatory handovervoid disconnected(NodeConnection remoteCon)
remoteCon
- the RemoteConnection which the event happenedvoid newMessageReceived(NodeConnection remoteCon, Message message)
remoteCon
- the RemoteConnection which the event happenedmessage
- the message just receivedvoid unsentMessages(NodeConnection remoteCon, java.util.List<Message> unsentMessages)
remoteCon
- the Remote Connection related with the eventunsentMessages
- a list with all unsent messagesvoid internalException(NodeConnection remoteCon, java.lang.Exception e)
remoteCon
- the RemoteConnection relatede
- the Exception