Package org.eclipse.hono.util
Enum Class QoS
- All Implemented Interfaces:
Serializable
,Comparable<QoS>
,Constable
Denotes the quality-of-service level (in Hono's terms) used for sending a message.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that a message might be sent multiple times, for example if the sender believes that the message might have not reached its recipient due to a network problem.Indicates that the message will be sent at most once, i.e. -
Method Summary
Modifier and TypeMethodDescriptionstatic QoS
from
(int code) Gets the quality of service corresponding to a given integer.static QoS
Returns the enum constant of this class with the specified name.static QoS[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AT_MOST_ONCE
Indicates that the message will be sent at most once, i.e. the sender does not care about whether the message is successfully transferred and/or processed by receivers. -
AT_LEAST_ONCE
Indicates that a message might be sent multiple times, for example if the sender believes that the message might have not reached its recipient due to a network problem.
-
-
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
-
from
Gets the quality of service corresponding to a given integer.- Parameters:
code
- The code to get the qos for.- Returns:
AT_MOST_ONCE
if code is 0,AT_LEAST_ONCE
if code is 1, otherwisenull
.
-