public interface NodeConnection extends ExtendedMessageSource
Modifier and Type | Method and Description |
---|---|
void |
addNodeConnectionListener(NodeConnectionListener lis)
Adds a listener to this connection.
|
void |
addSddlListener(SddlNetworkListener lis)
Adds a SDDL listener to this connection.
|
void |
connect(java.net.SocketAddress endpoint)
Tries to stablish a connection to the specified address.
|
void |
disconnect()
Disconnect with the Gateway.
|
int |
getNumberOfReconnectionsMade()
Method that gets the number of reconnection made.
|
java.util.UUID |
getUuid()
Returns the UUID of the connection.
|
void |
removeNodeConnectionListener(NodeConnectionListener lis)
Removes a listener to this connection.
|
void |
removeSddlListener(SddlNetworkListener lis)
Removes a SDDL listener to this connection.
|
void |
sendMessage(Message message)
Sends a message to the Gateway.
|
addExtendedMessageListener, removeExtendedMessageListener
void connect(java.net.SocketAddress endpoint) throws java.io.IOException
endpoint
- java.io.IOException
void disconnect() throws java.io.IOException
java.io.IOException
int getNumberOfReconnectionsMade()
void sendMessage(Message message) throws java.io.IOException
message
- java.io.IOException
void addNodeConnectionListener(NodeConnectionListener lis)
lis
- void removeNodeConnectionListener(NodeConnectionListener lis)
lis
- void addSddlListener(SddlNetworkListener lis)
lis
- void removeSddlListener(SddlNetworkListener lis)
lis
- java.util.UUID getUuid()