Enum Class Mqtt5AuthReasonCode

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

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

    • SUCCESS

      public static final Mqtt5AuthReasonCode SUCCESS
      Authentication is successful.
    • CONTINUE_AUTHENTICATION

      public static final Mqtt5AuthReasonCode CONTINUE_AUTHENTICATION
      Continue the authentication with another step.
    • REAUTHENTICATE

      public static final Mqtt5AuthReasonCode REAUTHENTICATE
      Initiate a re-authentication.
  • Method Details

    • values

      public static Mqtt5AuthReasonCode[] 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 Mqtt5AuthReasonCode 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 Mqtt5AuthReasonCode fromCode(int code)
      Returns the Auth Reason Code belonging to the given byte code.
      Parameters:
      code - the byte code.
      Returns:
      the Auth Reason Code belonging to the given byte code or null if the byte code is not a valid Auth Reason Code.
    • canBeSentByServer

      public boolean canBeSentByServer()
      Specified by:
      canBeSentByServer in interface Mqtt5ReasonCode
      Returns:
      whether this Reason Code can be sent by the server according to the MQTT 5 specification.
    • canBeSentByClient

      public boolean canBeSentByClient()
      Specified by:
      canBeSentByClient in interface Mqtt5ReasonCode
      Returns:
      whether this Reason Code can be sent by the client according to the MQTT 5 specification.