Package software.amazon.awssdk.crt.mqtt
Enum QualityOfService
- java.lang.Object
-
- java.lang.Enum<QualityOfService>
-
- software.amazon.awssdk.crt.mqtt.QualityOfService
-
- All Implemented Interfaces:
Serializable
,Comparable<QualityOfService>
public enum QualityOfService extends Enum<QualityOfService>
Quality of Service associated with a publish action or subscription [MQTT-4.3].
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AT_LEAST_ONCE
Message will be delivered at least once.AT_MOST_ONCE
Message will be delivered at most once, or may not be delivered at all.EXACTLY_ONCE
The message is always delivered exactly once.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static QualityOfService
getEnumValueFromInteger(int value)
Creates a Java QualityOfService enum value from a native integer valueint
getValue()
static QualityOfService
valueOf(String name)
Returns 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 Detail
-
AT_MOST_ONCE
public static final QualityOfService 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
public static final QualityOfService 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
public static final 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 Detail
-
values
public static QualityOfService[] 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 (QualityOfService c : QualityOfService.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static QualityOfService valueOf(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:
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
public static QualityOfService getEnumValueFromInteger(int value)
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
-
-