public class HeartBeatManger extends Object implements ReconnectionListener
HeartBeatManger generates fake traffic if connection remains idle for
certain duration.
Heartbeat manager swallows network layer exceptions and continues to run
| Constructor and Description |
|---|
HeartBeatManger(XMPPConnection connection) |
HeartBeatManger(XMPPConnection connection,
Duration hbFrequency) |
| Modifier and Type | Method and Description |
|---|---|
void |
reconnected()
Call if reconnection is successful
|
void |
reconnectionFailed()
Call if reconnection failed.
|
void |
reconnectionStarted()
Call when reconnection is triggered
|
void |
start()
Start heart beat manager.
|
void |
stop()
Terminate heartbeat manager.
|
public HeartBeatManger(XMPPConnection connection)
public HeartBeatManger(XMPPConnection connection, Duration hbFrequency)
public void start()
public void stop()
public void reconnectionStarted()
ReconnectionListenerreconnectionStarted in interface ReconnectionListenerpublic void reconnected()
ReconnectionListenerreconnected in interface ReconnectionListenerpublic void reconnectionFailed()
ReconnectionListenerreconnectionFailed in interface ReconnectionListenerCopyright © 2019. All rights reserved.