Class DisconnectPacket


  • public class DisconnectPacket
    extends java.lang.Object
    Data model of an MQTT5 DISCONNECT packet.
    • Method Detail

      • getSessionExpiryIntervalSeconds

        public java.lang.Long getSessionExpiryIntervalSeconds()
        Returns a change to the session expiry interval negotiated at connection time as part of the disconnect. Only valid for DisconnectPackets sent from client to server. It is not valid to attempt to change session expiry from zero to a non-zero value. See MQTT5 Session Expiry Interval.
        Returns:
        A change to the session expiry interval negotiated at connection time as part of the disconnect.
      • getReasonString

        public java.lang.String getReasonString()
        Returns additional diagnostic information about the reason that the sender is closing the connection See MQTT5 Reason String
        Returns:
        Additional diagnostic information about the reason that the sender is closing the connection
      • getUserProperties

        public java.util.List<UserProperty> getUserProperties()
        Returns a list of MQTT5 user properties included with the packet. See MQTT5 User Property
        Returns:
        List of MQTT5 user properties included with the packet.
      • getServerReference

        public java.lang.String getServerReference()
        Returns a property indicating an alternate server that the client may temporarily or permanently attempt to connect to instead of the configured endpoint. Will only be set if the reason code indicates another server may be used (ServerMoved, UseAnotherServer). See MQTT5 Server Reference
        Returns:
        Property indicating an alternate server that the client may temporarily or permanently attempt to connect to instead of the configured endpoint.