public final class ReconnectionManager extends Manager
Reconnection is not performed, if the user got disconnected due to an <conflict/> stream error.
Generally speaking it is 2^attempt * 60 seconds.
You can also set your own reconnection strategy.
UsegetNextReconnectionAttempt() if you want to find out, when the next reconnection attempt will happen.
This class is unconditionally thread-safe.
| Modifier and Type | Method and Description |
|---|---|
Date |
getNextReconnectionAttempt()
Gets the date of the next reconnection attempt.
|
ReconnectionStrategy |
getReconnectionStrategy()
Gets the reconnection strategy.
|
void |
setEnabled(boolean enabled)
Enables or disables this manager.
|
void |
setReconnectionStrategy(ReconnectionStrategy reconnectionStrategy)
Sets the reconnection strategy.
|
public final ReconnectionStrategy getReconnectionStrategy()
public final void setReconnectionStrategy(ReconnectionStrategy reconnectionStrategy)
reconnectionStrategy - The reconnection strategy.public final Date getNextReconnectionAttempt()
public final void setEnabled(boolean enabled)
ManagersetEnabled in class Managerenabled - If the manager gets enabled.Manager.isEnabled()Copyright © 2014–2015 XMPP.rocks. All rights reserved.