Enum Class Mqtt5UnsubAckReasonCode

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

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

    • SUCCESS

      public static final Mqtt5UnsubAckReasonCode SUCCESS
      The subscription is deleted.
    • NO_SUBSCRIPTIONS_EXISTED

      public static final Mqtt5UnsubAckReasonCode NO_SUBSCRIPTIONS_EXISTED
      No matching topic filter is being used by the client.
    • UNSPECIFIED_ERROR

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

      public static final Mqtt5UnsubAckReasonCode IMPLEMENTATION_SPECIFIC_ERROR
      The UNSUBSCRIBE packet is valid but is not accepted by the server.
    • NOT_AUTHORIZED

      public static final Mqtt5UnsubAckReasonCode NOT_AUTHORIZED
      The client is not authorized to unsubscribe.
    • TOPIC_FILTER_INVALID

      public static final Mqtt5UnsubAckReasonCode TOPIC_FILTER_INVALID
      The topic filter is formed correctly but is not accepted by the server (for this client).
    • PACKET_IDENTIFIER_IN_USE

      public static final Mqtt5UnsubAckReasonCode PACKET_IDENTIFIER_IN_USE
      The specified packet identifier is already in use.
  • Method Details

    • values

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