Interface ConnectionListener

All Known Implementing Classes:
AbstractConnectionClosedListener, JingleIBBTransportManager, JingleS5BTransportManager, JingleTransportManager

public interface ConnectionListener
Interface that allows for implementing classes to listen for connection closing and reconnection events. Listeners are registered with XMPPConnection objects.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    authenticated(XMPPConnection connection, boolean resumed)
    Notification that the connection has been authenticated.
    default void
    Notification that the connection has been successfully connected to the remote endpoint (e.g.
    default void
    Notification that the connection is in the process of connecting.
    default void
    Notification that the connection was closed normally.
    default void
    Notification that the connection was closed due to an exception.
  • Method Details

    • connecting

      default void connecting(XMPPConnection connection)
      Notification that the connection is in the process of connecting. This method is called when AbstractXMPPConnection.connect() is executed.
      Parameters:
      connection - connection
      Since:
      4.4
    • connected

      default void connected(XMPPConnection connection)
      Notification that the connection has been successfully connected to the remote endpoint (e.g. the XMPP server).

      Note that the connection is likely not yet authenticated and therefore only limited operations like registering an account may be possible.

      Parameters:
      connection - the XMPPConnection which successfully connected to its endpoint.
    • authenticated

      default void authenticated(XMPPConnection connection, boolean resumed)
      Notification that the connection has been authenticated.
      Parameters:
      connection - the XMPPConnection which successfully authenticated.
      resumed - true if a previous XMPP session's stream was resumed.
    • connectionClosed

      default void connectionClosed()
      Notification that the connection was closed normally.
    • connectionClosedOnError

      Notification that the connection was closed due to an exception. When abruptly disconnected it is possible for the connection to try reconnecting to the server.
      Parameters:
      e - the exception.