public class TimerPingSender extends java.lang.Object implements MqttPingSender
This class implements the MqttPingSender
pinger interface allowing applications to send ping packet to server
every keep alive interval.
MqttPingSender
Constructor and Description |
---|
TimerPingSender() |
Modifier and Type | Method and Description |
---|---|
void |
init(ClientComms comms)
Initial method.
|
void |
schedule(long delayInMilliseconds)
Schedule next ping in certain delay.
|
void |
start()
Start ping sender.
|
void |
stop()
Stop ping sender.
|
public void init(ClientComms comms)
MqttPingSender
init
in interface MqttPingSender
comms
- core of the client, which holds the state information for pending and in-flight messages.public void start()
MqttPingSender
start
in interface MqttPingSender
public void stop()
MqttPingSender
stop
in interface MqttPingSender
public void schedule(long delayInMilliseconds)
MqttPingSender
schedule
in interface MqttPingSender
delayInMilliseconds
- in milliseconds.