Interface ConnectionListener


  • public interface ConnectionListener
    This interface provides a callback method that is called by the JADE runtime (front-end of a split container) when connection specific events happen on the device. Application developers wishing to handle these events may provide a class implementing this interface and set the connection-listener property to the fully qualified name of that class. ConnectionListener implementation classes must have an accessible default constructor;
    Alternatively an object implementing the ConnectionListener interface may be put in the activation Properties specified at JADE runtime activation.
    Author:
    Giovanni Caire - TILAB
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int BE_NOT_FOUND
      This event is raised when the mediator replies with a BE Not Found to a CONNECT_MEDIATOR request.
      static int BEFORE_CONNECTION
      This event is rised just before each attempt to create a network connection.
      static int DISCONNECTED
      This event is raised whenever a temporary disconnection is detected.
      static int DROPPED
      This event is raised whenever a the FrontEnd drops down the connection with the BackEnd since no data has been transferred over the connection since a while.
      static int NOT_AUTHORIZED
      This event is raised when the mediator replies with an error response of type Not Authorized to a CREATE_MEDIATOR or CONNECT_MEDIATOR request.
      static int RECONNECTED
      This event is raised whenever a the device reconnects after a temporary disconnection.
      static int RECONNECTION_FAILURE
      This event is raised when the device detects it is no longer possible to reconnect (e.g.
    • Field Detail

      • BEFORE_CONNECTION

        static final int BEFORE_CONNECTION
        This event is rised just before each attempt to create a network connection. A common use case consists in reacting to it to set up an appropriate PDP context just if not in place already.
        See Also:
        Constant Field Values
      • DISCONNECTED

        static final int DISCONNECTED
        This event is raised whenever a temporary disconnection is detected.
        See Also:
        Constant Field Values
      • RECONNECTED

        static final int RECONNECTED
        This event is raised whenever a the device reconnects after a temporary disconnection.
        See Also:
        Constant Field Values
      • DROPPED

        static final int DROPPED
        This event is raised whenever a the FrontEnd drops down the connection with the BackEnd since no data has been transferred over the connection since a while. This can only happen if the drop-down-time option is set to a value > 0.
        See Also:
        Constant Field Values
      • RECONNECTION_FAILURE

        static final int RECONNECTION_FAILURE
        This event is raised when the device detects it is no longer possible to reconnect (e.g. because the maximum disconnection timeout expired)
        See Also:
        Constant Field Values
      • BE_NOT_FOUND

        static final int BE_NOT_FOUND
        This event is raised when the mediator replies with a BE Not Found to a CONNECT_MEDIATOR request.
        See Also:
        Constant Field Values
      • NOT_AUTHORIZED

        static final int NOT_AUTHORIZED
        This event is raised when the mediator replies with an error response of type Not Authorized to a CREATE_MEDIATOR or CONNECT_MEDIATOR request.
        See Also:
        Constant Field Values
    • Method Detail

      • handleConnectionEvent

        void handleConnectionEvent​(int ev,
                                   Object info)
        This callback method is called by the JADE runtime (front-end of a split container) when connection specific events happen on the device.
        Parameters:
        ev - The event that happened
        info - an object parameter of the event.