Package org.jivesoftware.smack
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.
-
Method Summary
Modifier and TypeMethodDescriptiondefault 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
Notification that the connection was closed normally.default void
Notification that the connection was closed due to an exception.
-
Method Details
-
connecting
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
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
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
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.
-