Package org.openmuc.jeebus.ship.api
Interface ConnectionHandler
-
public interface ConnectionHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconnectionDataExchangeEnabled(java.lang.String ipAddr)Called when the connection to a device reaches the state "Connection Data Exchange".voidonDisconnect(DisconnectReason reason, ShipConnectionInterface shipConn)called when the connection is closedvoidonMessageReceived(byte[] fullMsg, byte[] payload, ShipConnectionInterface shipConn)called when a message with payload was receivedvoidserviceAdded(java.lang.String ipAddr, java.lang.String ski)called when a service is recognized and addedvoidserviceRemoved(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 addedski- the ski value of the service/node 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
-
connectionDataExchangeEnabled
void connectionDataExchangeEnabled(java.lang.String ipAddr)
Called when the connection to a device reaches the state "Connection Data Exchange". This is the State where non-SHIP-specific Messages (i.e. SPINE) are exchanged.- Parameters:
ipAddr- the IP address of the connected device
-
-