Package com.hivemq.client.mqtt.datatypes
Enum Class MqttQos
- All Implemented Interfaces:
Serializable,Comparable<MqttQos>,Constable
MQTT Quality of Service (QoS) according to the MQTT specification.
- 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 ConstantDescriptionQoS for ensuring at least once delivery.QoS for at most once delivery according to the capabilities of the underlying network.QoS for ensuring exactly once delivery. -
Method Summary
Modifier and TypeMethodDescriptionfromCode(int code) Returns the QoS belonging to the given byte code.intgetCode()static MqttQosReturns the enum constant of this class with the specified name.static MqttQos[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AT_MOST_ONCE
QoS for at most once delivery according to the capabilities of the underlying network. -
AT_LEAST_ONCE
QoS for ensuring at least once delivery. -
EXACTLY_ONCE
QoS for ensuring exactly once delivery.
-
-
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()- Returns:
- the byte code of this QoS.
-
fromCode
Returns the QoS belonging to the given byte code.- Parameters:
code- the byte code.- Returns:
- the QoS belonging to the given byte code or null if the byte code is not a valid QoS code.
-