Enum Class Mqtt3ConnAckReturnCode

java.lang.Object
java.lang.Enum<Mqtt3ConnAckReturnCode>
com.hivemq.client.mqtt.mqtt3.message.connect.connack.Mqtt3ConnAckReturnCode
All Implemented Interfaces:
Mqtt3ReturnCode, Serializable, Comparable<Mqtt3ConnAckReturnCode>, Constable

public enum Mqtt3ConnAckReturnCode extends Enum<Mqtt3ConnAckReturnCode> implements Mqtt3ReturnCode
Return Code of an MQTT 3 ConnAck message.
Since:
1.0
  • Enum Constant Details

    • SUCCESS

      public static final Mqtt3ConnAckReturnCode SUCCESS
      The connection is accepted.
    • UNSUPPORTED_PROTOCOL_VERSION

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

      public static final Mqtt3ConnAckReturnCode IDENTIFIER_REJECTED
      The client identifier is formed correctly but is not accepted by the server.
    • SERVER_UNAVAILABLE

      public static final Mqtt3ConnAckReturnCode SERVER_UNAVAILABLE
      The MQTT service is not available.
    • BAD_USER_NAME_OR_PASSWORD

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

      public static final Mqtt3ConnAckReturnCode NOT_AUTHORIZED
      The client is not authorized to connect.
  • Method Details

    • values

      public static Mqtt3ConnAckReturnCode[] 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 Mqtt3ConnAckReturnCode 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 Mqtt3ReturnCode
      Returns:
      the byte code of this Return Code.
    • isError

      public boolean isError()
      Specified by:
      isError in interface Mqtt3ReturnCode
      Returns:
      whether this Return Code is an Error Code.
    • fromCode

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