Interface WillPublishPacket

All Superinterfaces:
PublishPacket
All Known Subinterfaces:
ModifiableWillPublish

@DoNotImplement
public interface WillPublishPacket
extends PublishPacket
Contains all information for the Will Publish that is part of a CONNECT packet.
Since:
4.0.0, CE 2019.1
  • Method Details

    • builder

      A builder that can be used to create an MQTT 5 WillPublishPacket.
      Returns:
      A new WillPublishBuilder to create a Will Publish.
      Since:
      4.0.0, CE 2019.1
    • getWillDelay

      long getWillDelay()
      Delay in seconds before the Will Publish is sent.
      Returns:
      The will delay.
      Since:
      4.0.0, CE 2019.1
    • getTimestamp

      long getTimestamp()
      The timestamp when the CONNECT packet with the Will Publish arrived at the broker.

      When the Will Publish is sent to subscribers (after the client disconnected ungracefully and the Will delay has passed) the created PUBLISH packet will carry the timestamp that represents the moment when the delivery started.

      The returned timestamp is a UNIX timestamp since midnight, January 1, 1970 UTC in milliseconds.

      Specified by:
      getTimestamp in interface PublishPacket
      Returns:
      The timestamp.
      Since:
      4.4.0, CE 2020.4