Enum DisconnectPacket.DisconnectReasonCode

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ADMINISTRATIVE_ACTION
      Returned when the connection was closed due to an administrative action.
      CONNECTION_RATE_EXCEEDED
      Returned when the server disconnects the client due to the connection rate being too high.
      DISCONNECT_WITH_WILL_MESSAGE
      Returns when the client wants to disconnect but requires that the server publish the Will message configured on the connection.
      IMPLEMENTATION_SPECIFIC_ERROR
      Returned when a valid packet was received by the remote endpoint, but could not be processed by the current implementation.
      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.
      MALFORMED_PACKET
      Indicates the remote endpoint received a packet that does not conform to the MQTT specification.
      MAXIMUM_CONNECT_TIME
      Returned by the server when the maximum connection time authorized for the connection was exceeded.
      MESSAGE_RATE_TOO_HIGH
      Returned when the remote endpoint's incoming data rate was too high.
      NORMAL_DISCONNECTION
      Returned when the remote endpoint wishes to disconnect normally.
      NOT_AUTHORIZED
      Returned when the remote endpoint received a packet that represented an operation that was not authorized within the current connection.
      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.
      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.
      PROTOCOL_ERROR
      Returned when an unexpected or out-of-order packet was received by the remote endpoint.
      QOS_NOT_SUPPORTED
      Returned when the client sends a QoS that is greater than the maximum QOS established when the connection was opened.
      QUOTA_EXCEEDED
      Returned when an internal quota of the remote endpoint was exceeded.
      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.
      RETAIN_NOT_SUPPORTED
      Returned when the server does not support retained messages.
      SERVER_BUSY
      Returned when the server is busy and cannot continue processing packets from the client.
      SERVER_MOVED
      Returned by the server to tell the client to permanently use a different server.
      SERVER_SHUTTING_DOWN
      Returned when the server is shutting down.
      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.
      SHARED_SUBSCRIPTIONS_NOT_SUPPORTED
      Returned by the server to tell the client that shared subscriptions are not supported on the server.
      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.
      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.
      TOPIC_FILTER_INVALID
      Returned when the topic filter name is correctly formed but not accepted by the server.
      TOPIC_NAME_INVALID
      Returned when topic name is correctly formed, but is not accepted.
      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.
      USE_ANOTHER_SERVER
      Returned by the server to tell the client to temporarily use a different server.
      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.
    • Enum Constant Detail

      • 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.
      • 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 Detail

      • values

        public static DisconnectPacket.DisconnectReasonCode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DisconnectPacket.DisconnectReasonCode c : DisconnectPacket.DisconnectReasonCode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DisconnectPacket.DisconnectReasonCode valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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