Package org.jivesoftware.smack
Interface ConnectionListener
-
- All Known Implementing Classes:
AbstractConnectionClosedListener
,AbstractConnectionListener
,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.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
authenticated(XMPPConnection connection, boolean resumed)
Notification that the connection has been authenticated.default void
connected(XMPPConnection connection)
Notification that the connection has been successfully connected to the remote endpoint (e.g.default void
connecting(XMPPConnection connection)
Notification that the connection is in the process of connecting.default void
connectionClosed()
Notification that the connection was closed normally.default void
connectionClosedOnError(java.lang.Exception e)
Notification that the connection was closed due to an exception.
-
-
-
Method Detail
-
connecting
default void connecting(XMPPConnection connection)
Notification that the connection is in the process of connecting. This method is called whenAbstractXMPPConnection.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
default void connectionClosedOnError(java.lang.Exception e)
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.
-
-