Interface GatewayListener


  • public interface GatewayListener
    Interface GatewayListener to listen to event and changes in a OpenGateway
    Author:
    M. Valla - Initial contribution
    • 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 - the OWNException returned
      • onConnectionClosed

        void onConnectionClosed()
        This method is called after the gateway connection has been closed calling OpenGateway.closeConnection()
      • onDisconnected

        void onDisconnected​(OWNException error)
        This method is called after the connection with gateway has been lost/disconnected
        Parameters:
        error - the OWNException 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)
        After OpenGateway.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 device
        message - the OWN message received that identified the device
      • onDiscoveryCompleted

        void onDiscoveryCompleted()
        This method is called after OpenGateway.discoverDevices() is called when device discovery has been completed successfully