Enum Class Mqtt3SubAckReturnCode

java.lang.Object
java.lang.Enum<Mqtt3SubAckReturnCode>
com.hivemq.client.mqtt.mqtt3.message.subscribe.suback.Mqtt3SubAckReturnCode
All Implemented Interfaces:
Mqtt3ReturnCode, Serializable, Comparable<Mqtt3SubAckReturnCode>, Constable

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

    • SUCCESS_MAXIMUM_QOS_0

      public static final Mqtt3SubAckReturnCode SUCCESS_MAXIMUM_QOS_0
      The subscription is accepted and the maximum QoS sent will be QoS 0 (this might be a lower QoS than was requested).
    • SUCCESS_MAXIMUM_QOS_1

      public static final Mqtt3SubAckReturnCode SUCCESS_MAXIMUM_QOS_1
      The subscription is accepted and the maximum QoS sent will be QoS 1 (this might be a lower QoS than was requested).
    • SUCCESS_MAXIMUM_QOS_2

      public static final Mqtt3SubAckReturnCode SUCCESS_MAXIMUM_QOS_2
      The subscription is accepted and the maximum QoS sent will be QoS 2.
    • FAILURE

      public static final Mqtt3SubAckReturnCode FAILURE
      The subscription failed.
  • Method Details

    • values

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