Package org.jivesoftware.smack
Interface ReconnectionListener
-
public interface ReconnectionListener
A listener for theReconnectionManager
. UseReconnectionManager.addReconnectionListener(ReconnectionListener)
to add new listeners to the reconnection manager.- Since:
- 4.2.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
reconnectingIn(int seconds)
The connection will retry to reconnect in the specified number of seconds.void
reconnectionFailed(java.lang.Exception e)
An attempt to connect to the server has failed.
-
-
-
Method Detail
-
reconnectingIn
void reconnectingIn(int seconds)
The connection will retry to reconnect in the specified number of seconds.Note: This method is only called if
ReconnectionManager.isAutomaticReconnectEnabled()
returns true, i.e. only when the reconnection manager is enabled for the connection.- Parameters:
seconds
- remaining seconds before attempting a reconnection.
-
reconnectionFailed
void reconnectionFailed(java.lang.Exception e)
An attempt to connect to the server has failed. The connection will keep trying reconnecting to the server in a moment.Note: This method is only called if
ReconnectionManager.isAutomaticReconnectEnabled()
returns true, i.e. only when the reconnection manager is enabled for the connection.- Parameters:
e
- the exception that caused the reconnection to fail.
-
-