Enum DisconnectPacket.DisconnectReasonCode

java.lang.Object
java.lang.Enum<DisconnectPacket.DisconnectReasonCode>
software.amazon.awssdk.crt.mqtt5.packets.DisconnectPacket.DisconnectReasonCode
All Implemented Interfaces:
Serializable, Comparable<DisconnectPacket.DisconnectReasonCode>
Enclosing class:
DisconnectPacket

public static enum DisconnectPacket.DisconnectReasonCode extends Enum<DisconnectPacket.DisconnectReasonCode>
Reason code inside DisconnectPackets. Helps determine why a connection was terminated. Enum values match MQTT5 spec encoding values.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Returned when the connection was closed due to an administrative action.
    Returned when the server disconnects the client due to the connection rate being too high.
    Returns when the client wants to disconnect but requires that the server publish the Will message configured on the connection.
    Returned when a valid packet was received by the remote endpoint, but could not be processed by the current implementation.
    Returned when the server closes the connection because no packet from the client has been received in 1.5 times the KeepAlive time set when the connection was established.
    Indicates the remote endpoint received a packet that does not conform to the MQTT specification.
    Returned by the server when the maximum connection time authorized for the connection was exceeded.
    Returned when the remote endpoint's incoming data rate was too high.
    Returned when the remote endpoint wishes to disconnect normally.
    Returned when the remote endpoint received a packet that represented an operation that was not authorized within the current connection.
    Returned when the remote endpoint received a packet whose size was greater than the maximum packet size limit it established for itself when the connection was opened.
    Returned when the remote endpoint received a packet where payload format did not match the format specified by the payload format indicator.
    Returned when an unexpected or out-of-order packet was received by the remote endpoint.
    Returned when the client sends a QoS that is greater than the maximum QOS established when the connection was opened.
    Returned when an internal quota of the remote endpoint was exceeded.
    Returned when the remote endpoint reached a state where there were more in-progress QoS1+ publishes then the limit it established for itself when the connection was opened.
    Returned when the server does not support retained messages.
    Returned when the server is busy and cannot continue processing packets from the client.
    Returned by the server to tell the client to permanently use a different server.
    Returned when the server is shutting down.
    Returned when the server has established another connection with the same client ID as a client's current connection, causing the current client to become disconnected.
    Returned by the server to tell the client that shared subscriptions are not supported on the server.
    Returned by the server when it received a SubscribePacket with a subscription identifier, but the server does not support subscription identifiers.
    Returned when the remote endpoint receives a PublishPacket that contained a topic alias greater than the maximum topic alias limit that it established for itself when the connection was opened.
    Returned when the topic filter name is correctly formed but not accepted by the server.
    Returned when topic name is correctly formed, but is not accepted.
    Returned when the connection was closed but the sender does not want to specify a reason or none of the other reason codes apply.
    Returned by the server to tell the client to temporarily use a different server.
    Returned by the server when it received a SubscribePacket with a wildcard topic filter, but the server does not support wildcard topic filters.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a Java DisconnectReasonCode enum value from a native integer value.
    int
     
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NORMAL_DISCONNECTION

      public static final DisconnectPacket.DisconnectReasonCode NORMAL_DISCONNECTION
      Returned when the remote endpoint wishes to disconnect normally. Will not trigger the publish of a Will message if a Will message was configured on the connection. May be sent by the client or server.
    • DISCONNECT_WITH_WILL_MESSAGE

      public static final DisconnectPacket.DisconnectReasonCode DISCONNECT_WITH_WILL_MESSAGE
      Returns when the client wants to disconnect but requires that the server publish the Will message configured on the connection. May only be sent by the client.
    • UNSPECIFIED_ERROR

      public static final DisconnectPacket.DisconnectReasonCode UNSPECIFIED_ERROR
      Returned when the connection was closed but the sender does not want to specify a reason or none of the other reason codes apply. May be sent by the client or the server.
    • MALFORMED_PACKET

      public static final DisconnectPacket.DisconnectReasonCode MALFORMED_PACKET
      Indicates the remote endpoint received a packet that does not conform to the MQTT specification. May be sent by the client or the server.
    • PROTOCOL_ERROR

      public static final DisconnectPacket.DisconnectReasonCode PROTOCOL_ERROR
      Returned when an unexpected or out-of-order packet was received by the remote endpoint. May be sent by the client or the server.
    • IMPLEMENTATION_SPECIFIC_ERROR

      public static final DisconnectPacket.DisconnectReasonCode IMPLEMENTATION_SPECIFIC_ERROR
      Returned when a valid packet was received by the remote endpoint, but could not be processed by the current implementation. May be sent by the client or the server.
    • NOT_AUTHORIZED

      public static final DisconnectPacket.DisconnectReasonCode NOT_AUTHORIZED
      Returned when the remote endpoint received a packet that represented an operation that was not authorized within the current connection. May only be sent by the server.
    • SERVER_BUSY

      public static final DisconnectPacket.DisconnectReasonCode SERVER_BUSY
      Returned when the server is busy and cannot continue processing packets from the client. May only be sent by the server.
    • SERVER_SHUTTING_DOWN

      public static final DisconnectPacket.DisconnectReasonCode SERVER_SHUTTING_DOWN
      Returned when the server is shutting down. May only be sent by the server.
    • KEEP_ALIVE_TIMEOUT

      public static final DisconnectPacket.DisconnectReasonCode KEEP_ALIVE_TIMEOUT
      Returned when the server closes the connection because no packet from the client has been received in 1.5 times the KeepAlive time set when the connection was established. May only be sent by the server.
    • SESSION_TAKEN_OVER

      public static final DisconnectPacket.DisconnectReasonCode SESSION_TAKEN_OVER
      Returned when the server has established another connection with the same client ID as a client's current connection, causing the current client to become disconnected. May only be sent by the server.
    • TOPIC_FILTER_INVALID

      public static final DisconnectPacket.DisconnectReasonCode TOPIC_FILTER_INVALID
      Returned when the topic filter name is correctly formed but not accepted by the server. May only be sent by the server.
    • TOPIC_NAME_INVALID

      public static final DisconnectPacket.DisconnectReasonCode TOPIC_NAME_INVALID
      Returned when topic name is correctly formed, but is not accepted. May be sent by the client or the server.
    • RECEIVE_MAXIMUM_EXCEEDED

      public static final DisconnectPacket.DisconnectReasonCode RECEIVE_MAXIMUM_EXCEEDED
      Returned when the remote endpoint reached a state where there were more in-progress QoS1+ publishes then the limit it established for itself when the connection was opened. May be sent by the client or the server.
    • TOPIC_ALIAS_INVALID

      public static final DisconnectPacket.DisconnectReasonCode TOPIC_ALIAS_INVALID
      Returned when the remote endpoint receives a PublishPacket that contained a topic alias greater than the maximum topic alias limit that it established for itself when the connection was opened. May be sent by the client or the server.
    • PACKET_TOO_LARGE

      public static final DisconnectPacket.DisconnectReasonCode PACKET_TOO_LARGE
      Returned when the remote endpoint received a packet whose size was greater than the maximum packet size limit it established for itself when the connection was opened. May be sent by the client or the server.
    • MESSAGE_RATE_TOO_HIGH

      public static final DisconnectPacket.DisconnectReasonCode MESSAGE_RATE_TOO_HIGH
      Returned when the remote endpoint's incoming data rate was too high. May be sent by the client or the server.
    • QUOTA_EXCEEDED

      public static final DisconnectPacket.DisconnectReasonCode QUOTA_EXCEEDED
      Returned when an internal quota of the remote endpoint was exceeded. May be sent by the client or the server.
    • ADMINISTRATIVE_ACTION

      public static final DisconnectPacket.DisconnectReasonCode ADMINISTRATIVE_ACTION
      Returned when the connection was closed due to an administrative action. May be sent by the client or the server.
    • PAYLOAD_FORMAT_INVALID

      public static final DisconnectPacket.DisconnectReasonCode PAYLOAD_FORMAT_INVALID
      Returned when the remote endpoint received a packet where payload format did not match the format specified by the payload format indicator. May be sent by the client or the server.
    • RETAIN_NOT_SUPPORTED

      public static final DisconnectPacket.DisconnectReasonCode RETAIN_NOT_SUPPORTED
      Returned when the server does not support retained messages. May only be sent by the server.
    • QOS_NOT_SUPPORTED

      public static final DisconnectPacket.DisconnectReasonCode QOS_NOT_SUPPORTED
      Returned when the client sends a QoS that is greater than the maximum QOS established when the connection was opened. May only be sent by the server.
    • USE_ANOTHER_SERVER

      public static final DisconnectPacket.DisconnectReasonCode USE_ANOTHER_SERVER
      Returned by the server to tell the client to temporarily use a different server. May only be sent by the server.
    • SERVER_MOVED

      public static final DisconnectPacket.DisconnectReasonCode SERVER_MOVED
      Returned by the server to tell the client to permanently use a different server. May only be sent by the server.
    • SHARED_SUBSCRIPTIONS_NOT_SUPPORTED

      public static final DisconnectPacket.DisconnectReasonCode SHARED_SUBSCRIPTIONS_NOT_SUPPORTED
      Returned by the server to tell the client that shared subscriptions are not supported on the server. May only be sent by the server.
    • CONNECTION_RATE_EXCEEDED

      public static final DisconnectPacket.DisconnectReasonCode CONNECTION_RATE_EXCEEDED
      Returned when the server disconnects the client due to the connection rate being too high. May only be sent by the server.
    • MAXIMUM_CONNECT_TIME

      public static final DisconnectPacket.DisconnectReasonCode MAXIMUM_CONNECT_TIME
      Returned by the server when the maximum connection time authorized for the connection was exceeded. May only be sent by the server.
    • SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED

      public static final DisconnectPacket.DisconnectReasonCode SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED
      Returned by the server when it received a SubscribePacket with a subscription identifier, but the server does not support subscription identifiers. May only be sent by the server.
    • WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED

      public static final DisconnectPacket.DisconnectReasonCode WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED
      Returned by the server when it received a SubscribePacket with a wildcard topic filter, but the server does not support wildcard topic filters. May only be sent by the server.
  • Method Details

    • values

      public static DisconnectPacket.DisconnectReasonCode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DisconnectPacket.DisconnectReasonCode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Returns:
      The native enum integer value associated with this Java enum value
    • getEnumValueFromInteger

      public static DisconnectPacket.DisconnectReasonCode getEnumValueFromInteger(int value)
      Creates a Java DisconnectReasonCode enum value from a native integer value.
      Parameters:
      value - native integer value for DisconnectReasonCode
      Returns:
      a new DisconnectReasonCode value