public class ReconnectionManager extends AbstractConnectionListener
The reconnection mechanism will try to reconnect periodically:
Modifier and Type | Method and Description |
---|---|
void |
connectionClosed()
Notification that the connection was closed normally or that the reconnection
process has been aborted.
|
void |
connectionClosedOnError(Exception e)
Notification that the connection was closed due to an exception.
|
protected void |
notifyAttemptToReconnectIn(int seconds)
Fires listeners when The XMPPConnection will retry a reconnection.
|
protected void |
notifyReconnectionFailed(Exception exception)
Fires listeners when a reconnection attempt has failed.
|
protected void |
reconnect()
Starts a reconnection mechanism if it was configured to do that.
|
authenticated, connected, reconnectingIn, reconnectionFailed, reconnectionSuccessful
protected void reconnect()
protected void notifyReconnectionFailed(Exception exception)
exception
- the exception that occured.protected void notifyAttemptToReconnectIn(int seconds)
seconds
- the number of seconds that a reconnection will be attempted in.public void connectionClosed()
ConnectionListener
connectionClosed
in interface ConnectionListener
connectionClosed
in class AbstractConnectionListener
public void connectionClosedOnError(Exception e)
ConnectionListener
connectionClosedOnError
in interface ConnectionListener
connectionClosedOnError
in class AbstractConnectionListener
e
- the exception.