Package org.openwebnet4j
Interface GatewayListener
-
public interface GatewayListener
InterfaceGatewayListener
to listen to event and changes in aOpenGateway
- Author:
- M. Valla - Initial contribution
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onConnected()
This method is called after the connection to the gateway has been established correctlyvoid
onConnectionClosed()
This method is called after the gateway connection has been closed callingOpenGateway.closeConnection()
void
onConnectionError(OWNException error)
This method is called when connecting to gateway has returned and errorvoid
onDisconnected(OWNException error)
This method is called after the connection with gateway has been lost/disconnectedvoid
onDiscoveryCompleted()
This method is called afterOpenGateway.discoverDevices()
is called when device discovery has been completed successfullyvoid
onEventMessage(OpenMessage msg)
This method is called when a new OpenWebNet message is received on the gateway MON sessionvoid
onNewDevice(Where where, OpenDeviceType deviceType, BaseOpenMessage message)
AfterOpenGateway.discoverDevices()
is called, each time a new device is discovered, this method will be calledvoid
onReconnected()
This method is called after the connection with gateway has been re-connected
-
-
-
Method Detail
-
onConnected
void onConnected()
This method is called after the connection to the gateway has been established correctly
-
onConnectionError
void onConnectionError(OWNException error)
This method is called when connecting to gateway has returned and error- Parameters:
error
- theOWNException
returned
-
onConnectionClosed
void onConnectionClosed()
This method is called after the gateway connection has been closed callingOpenGateway.closeConnection()
-
onDisconnected
void onDisconnected(OWNException error)
This method is called after the connection with gateway has been lost/disconnected- Parameters:
error
- theOWNException
returned
-
onReconnected
void onReconnected()
This method is called after the connection with gateway has been re-connected
-
onEventMessage
void onEventMessage(OpenMessage msg)
This method is called when a new OpenWebNet message is received on the gateway MON session- Parameters:
msg
- the OpenMessage received
-
onNewDevice
void onNewDevice(Where where, OpenDeviceType deviceType, BaseOpenMessage message)
AfterOpenGateway.discoverDevices()
is called, each time a new device is discovered, this method will be called- Parameters:
where
- the discovered device's address (WHERE)deviceType
- device type of the discovered devicemessage
- the OWN message received that identified the device
-
onDiscoveryCompleted
void onDiscoveryCompleted()
This method is called afterOpenGateway.discoverDevices()
is called when device discovery has been completed successfully
-
-