Package cool.mqtt.hooks
Enum QoS
- java.lang.Object
-
- java.lang.Enum<QoS>
-
- cool.mqtt.hooks.QoS
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AT_LEAST_ONCE
The singleton instance for At least once level.AT_MOST_ONCE
The singleton instance for At most once level.EXACTLY_ONCE
The singleton instance for Exactly once level.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getValue()
Gets the Quality of Service levelint
value.static QoS
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static QoS[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AT_MOST_ONCE
public static final QoS AT_MOST_ONCE
The singleton instance for At most once level. This has the numeric value of0
.
-
AT_LEAST_ONCE
public static final QoS AT_LEAST_ONCE
The singleton instance for At least once level. This has the numeric value of1
.
-
EXACTLY_ONCE
public static final QoS EXACTLY_ONCE
The singleton instance for Exactly once level. This has the numeric value of2
.
-
-
Method Detail
-
values
public static QoS[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (QoS c : QoS.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static QoS valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getValue
public int getValue()
Gets the Quality of Service levelint
value.- Returns:
- the Quality of Service level, from 0 (
AT_MOST_ONCE
) to 2 (EXACTLY_ONCE
once)
-
-