Enum Class Mqtt5ConnAckReasonCode

java.lang.Object
java.lang.Enum<Mqtt5ConnAckReasonCode>
com.hivemq.client.mqtt.mqtt5.message.connect.connack.Mqtt5ConnAckReasonCode
All Implemented Interfaces:
Mqtt5ReasonCode, Serializable, Comparable<Mqtt5ConnAckReasonCode>, Constable

public enum Mqtt5ConnAckReasonCode extends Enum<Mqtt5ConnAckReasonCode> implements Mqtt5ReasonCode
Reason Code of an MQTT 5 ConnAck message.
Since:
1.0
  • Enum Constant Details

    • SUCCESS

      public static final Mqtt5ConnAckReasonCode SUCCESS
      The connection is accepted.
    • UNSPECIFIED_ERROR

      public static final Mqtt5ConnAckReasonCode UNSPECIFIED_ERROR
      The server either does not want to reveal the reason for the failure or none of the other reason codes apply.
    • MALFORMED_PACKET

      public static final Mqtt5ConnAckReasonCode MALFORMED_PACKET
      The CONNECT packet could not be parsed correctly according to the MQTT specification.
    • PROTOCOL_ERROR

      public static final Mqtt5ConnAckReasonCode PROTOCOL_ERROR
      The CONNECT packet contained data that is not allowed by the MQTT protocol.
    • IMPLEMENTATION_SPECIFIC_ERROR

      public static final Mqtt5ConnAckReasonCode IMPLEMENTATION_SPECIFIC_ERROR
      The CONNECT packet is valid but is not accepted by the server.
    • UNSUPPORTED_PROTOCOL_VERSION

      public static final Mqtt5ConnAckReasonCode UNSUPPORTED_PROTOCOL_VERSION
      The server does not support the version of the MQTT protocol requested by the client.
    • CLIENT_IDENTIFIER_NOT_VALID

      public static final Mqtt5ConnAckReasonCode CLIENT_IDENTIFIER_NOT_VALID
      The client identifier is formed correctly but is not accepted by the server.
    • BAD_USER_NAME_OR_PASSWORD

      public static final Mqtt5ConnAckReasonCode BAD_USER_NAME_OR_PASSWORD
      The server does not accept the user name or password specified by the client.
    • NOT_AUTHORIZED

      public static final Mqtt5ConnAckReasonCode NOT_AUTHORIZED
      The client is not authorized to connect.
    • SERVER_UNAVAILABLE

      public static final Mqtt5ConnAckReasonCode SERVER_UNAVAILABLE
      The MQTT service is not available.
    • SERVER_BUSY

      public static final Mqtt5ConnAckReasonCode SERVER_BUSY
      The server is busy. Try again later.
    • BANNED

      public static final Mqtt5ConnAckReasonCode BANNED
      This client has been banned by administrative action. Contact the server administrator.
    • BAD_AUTHENTICATION_METHOD

      public static final Mqtt5ConnAckReasonCode BAD_AUTHENTICATION_METHOD
      The authentication method is not supported or does not match the authentication method currently in use.
    • TOPIC_NAME_INVALID

      public static final Mqtt5ConnAckReasonCode TOPIC_NAME_INVALID
      The Will topic name is formed correctly but is not accepted by the server.
    • PACKET_TOO_LARGE

      public static final Mqtt5ConnAckReasonCode PACKET_TOO_LARGE
      The CONNECT packet exceeded the maximum permissible size.
    • QUOTA_EXCEEDED

      public static final Mqtt5ConnAckReasonCode QUOTA_EXCEEDED
      An implementation or administrative imposed limit has been exceeded.
    • PAYLOAD_FORMAT_INVALID

      public static final Mqtt5ConnAckReasonCode PAYLOAD_FORMAT_INVALID
      The Will payload does not match the specified payload format indicator.
    • RETAIN_NOT_SUPPORTED

      public static final Mqtt5ConnAckReasonCode RETAIN_NOT_SUPPORTED
      The server does not support retained messages, but the Will retain flag was set.
    • QOS_NOT_SUPPORTED

      public static final Mqtt5ConnAckReasonCode QOS_NOT_SUPPORTED
      The server does not support the QoS of the Will.
    • USE_ANOTHER_SERVER

      public static final Mqtt5ConnAckReasonCode USE_ANOTHER_SERVER
      The client should temporarily use another server.
    • SERVER_MOVED

      public static final Mqtt5ConnAckReasonCode SERVER_MOVED
      The client should permanently use another server.
    • CONNECTION_RATE_EXCEEDED

      public static final Mqtt5ConnAckReasonCode CONNECTION_RATE_EXCEEDED
      The connection rate limit has been exceeded.
  • Method Details

    • values

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

      public static Mqtt5ConnAckReasonCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCode

      public int getCode()
      Specified by:
      getCode in interface Mqtt5ReasonCode
      Returns:
      the byte code of this Reason Code.
    • fromCode

      @Nullable public static @Nullable Mqtt5ConnAckReasonCode fromCode(int code)
      Returns the CONNACK Reason Code belonging to the given byte code.
      Parameters:
      code - the byte code.
      Returns:
      the CONNACK Reason Code belonging to the given byte code or null if the byte code is not a valid CONNACK Reason Code code.