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
Return Code of an
MQTT 3 SubAck message.- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe subscription failed.The subscription is accepted and the maximum QoS sent will be QoS 0 (this might be a lower QoS than was requested).The subscription is accepted and the maximum QoS sent will be QoS 1 (this might be a lower QoS than was requested).The subscription is accepted and the maximum QoS sent will be QoS 2. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Mqtt3SubAckReturnCodefromCode(int code) Returns the SubAck Return Code belonging to the given byte code.intgetCode()booleanisError()static Mqtt3SubAckReturnCodeReturns the enum constant of this class with the specified name.static Mqtt3SubAckReturnCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
The subscription is accepted and the maximum QoS sent will be QoS 2. -
FAILURE
The subscription failed.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getCode
public int getCode()- Specified by:
getCodein interfaceMqtt3ReturnCode- Returns:
- the byte code of this Return Code.
-
isError
public boolean isError()- Specified by:
isErrorin interfaceMqtt3ReturnCode- Returns:
- whether this Return Code is an Error Code.
-
fromCode
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
nullif the byte code is not a valid SubAck Return Code.
-