Package org.openmuc.jship.api
Interface ConnectionHandler
-
public interface ConnectionHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onDisconnect(DisconnectReason reason, ShipConnectionInterface shipConn)
called when the connection is closedvoid
onMessageReceived(byte[] fullMsg, byte[] payload, ShipConnectionInterface shipConn)
called when a message with payload was receivedvoid
serviceAdded(java.lang.String ipAddr, java.lang.String ski)
called when a service is recognized and addedvoid
serviceRemoved(java.lang.String ipAddr)
called when an added service was removed
-
-
-
Method Detail
-
onMessageReceived
void onMessageReceived(byte[] fullMsg, byte[] payload, ShipConnectionInterface shipConn)
called when a message with payload was received- Parameters:
fullMsg
- the received full message with headerspayload
- only the payload part of the received messageshipConn
- the connection that received the message
-
onDisconnect
void onDisconnect(DisconnectReason reason, ShipConnectionInterface shipConn)
called when the connection is closed- Parameters:
reason
- the reason why the connection was closedshipConn
- the connection that was closed
-
serviceAdded
void serviceAdded(java.lang.String ipAddr, java.lang.String ski)
called when a service is recognized and added- Parameters:
ipAddr
- the corresponding ip address of the service that was added
-
serviceRemoved
void serviceRemoved(java.lang.String ipAddr)
called when an added service was removed- Parameters:
ipAddr
- the corresponding ip address of the service that was removed
-
-