Class DisconnectPacket

java.lang.Object
software.amazon.awssdk.crt.mqtt5.packets.DisconnectPacket

public class DisconnectPacket extends Object
Data model of an MQTT5 DISCONNECT packet.
  • Method Details

    • getReasonCode

      public DisconnectPacket.DisconnectReasonCode getReasonCode()
      Returns a value indicating the reason that the sender is closing the connection See MQTT5 Disconnect Reason Code
      Returns:
      Value indicating the reason that the sender is closing the connection
    • getSessionExpiryIntervalSeconds

      public 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 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 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 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.