Package software.amazon.awssdk.crt.mqtt
Enum QualityOfService
- All Implemented Interfaces:
Serializable,Comparable<QualityOfService>
Quality of Service associated with a publish action or subscription [MQTT-4.3].
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMessage will be delivered at least once.Message will be delivered at most once, or may not be delivered at all.The message is always delivered exactly once. -
Method Summary
Modifier and TypeMethodDescriptionstatic QualityOfServicegetEnumValueFromInteger(int value) Creates a Java QualityOfService enum value from a native integer valueintgetValue()static QualityOfServiceReturns the enum constant of this type with the specified name.static QualityOfService[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AT_MOST_ONCE
Message will be delivered at most once, or may not be delivered at all. There will be no ACK, and the message will not be stored. -
AT_LEAST_ONCE
Message will be delivered at least once. It may be resent multiple times if errors occur before an ACK is returned to the sender. The message will be stored in case it has to be re-sent. This is the most common QualityOfService. -
EXACTLY_ONCE
The message is always delivered exactly once. This is the safest, but slowest QualityOfService, because multiple levels of handshake must happen to guarantee no duplication of messages.
-
-
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
-
getValue
public int getValue()- Returns:
- the native enum integer value associated with this Java enum value
-
getEnumValueFromInteger
Creates a Java QualityOfService enum value from a native integer value- Parameters:
value- native integer value for quality of service- Returns:
- a new QualityOfService value
-