Enum Qos
- All Implemented Interfaces:
Serializable,Comparable<Qos>,Constable
public enum Qos extends Enum<Qos>
The quality of service level (QOS) of a PUBLISH or subscription.
- Since:
- 4.0.0, CE 2019.1
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description AT_LEAST_ONCEAt least once delivery.AT_MOST_ONCEAt most once delivery.EXACTLY_ONCEAt exactly once delivery. -
Method Summary
Modifier and Type Method Description intgetQosNumber()Get the quality service level as integer.static @NotNull QosvalueOf(int code)Creates a Qos level enum from an integer.static QosvalueOf(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 Details
-
AT_MOST_ONCE
At most once delivery. The message will be delivered once or never (best effort delivery).- Since:
- 4.0.0, CE 2019.1
-
AT_LEAST_ONCE
At least once delivery. The message will be delivered once or multiple times.- Since:
- 4.0.0, CE 2019.1
-
EXACTLY_ONCE
At exactly once delivery. The message will be delivered once and only once.- Since:
- 4.0.0, CE 2019.1
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getQosNumber
public int getQosNumber()Get the quality service level as integer.- Returns:
- The quality of service.
- Since:
- 4.0.0, CE 2019.1
-
valueOf
Creates a Qos level enum from an integer.- Parameters:
code- the Qos level as integer code(0,1,2).- Returns:
- The Qos level.
- Throws:
IllegalArgumentException- when the parameter is an invalid quality of service level.- Since:
- 4.0.0, CE 2019.1
-