Package 

Class TimerPingSender

  • All Implemented Interfaces:
    org.eclipse.paho.client.mqttv3.MqttPingSender

    
    public class TimerPingSender
     implements MqttPingSender
                        

    Default ping sender implementation

    This class implements the IMqttPingSender pinger interface allowing applications to send ping packet to server every keep alive interval.

    • Method Summary

      Modifier and Type Method Description
      void init(ClientComms comms, ILogger logger) Initial method.
      void start() Start ping sender.
      void stop() Stop ping sender.
      void schedule(long delayInMilliseconds) Schedule next ping in certain delay.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • init

         void init(ClientComms comms, ILogger logger)

        Initial method. Pass interal state of current client in.

      • start

         void start()

        Start ping sender. It will be called after connection is success.

      • stop

         void stop()

        Stop ping sender. It is called if there is any errors or connection shutdowns.

      • schedule

         void schedule(long delayInMilliseconds)

        Schedule next ping in certain delay.