Enum SubAckPacket.SubAckReasonCode
- java.lang.Object
-
- java.lang.Enum<SubAckPacket.SubAckReasonCode>
-
- software.amazon.awssdk.crt.mqtt5.packets.SubAckPacket.SubAckReasonCode
-
- All Implemented Interfaces:
Serializable
,Comparable<SubAckPacket.SubAckReasonCode>
- Enclosing class:
- SubAckPacket
public static enum SubAckPacket.SubAckReasonCode extends Enum<SubAckPacket.SubAckReasonCode>
Reason code inside SubAckPacket payloads. Enum values match MQTT spec encoding values. This will only be sent by the server and not the client. Enum values match MQTT5 spec encoding values.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description GRANTED_QOS_0
Returned when the subscription was accepted and the maximum QoS sent will be QoS 0.GRANTED_QOS_1
Returned when the subscription was accepted and the maximum QoS sent will be QoS 1.GRANTED_QOS_2
Returned when the subscription was accepted and the maximum QoS sent will be QoS 2.IMPLEMENTATION_SPECIFIC_ERROR
Returned when the subscription was valid but the server did not accept it.NOT_AUTHORIZED
Returned when the client was not authorized to make the subscription on the server.PACKET_IDENTIFIER_IN_USE
Returned when the packet identifier was already in use on the server.QUOTA_EXCEEDED
Returned when a subscribe-related quota set on the server was exceeded.SHARED_SUBSCRIPTIONS_NOT_SUPPORTED
Returned when the subscription's topic filter was a shared subscription and the server does not support shared subscriptions.SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED
Returned when the SubscribePacket contained a subscription identifier and the server does not support subscription identifiers.TOPIC_FILTER_INVALID
Returned when the subscription topic filter was correctly formed but not allowed for the client.UNSPECIFIED_ERROR
Returned when the connection was closed but the sender does not want to specify a reason or none of the other reason codes apply.WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED
Returned when the subscription's topic filter contains a wildcard but the server does not support wildcard subscriptions.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SubAckPacket.SubAckReasonCode
getEnumValueFromInteger(int value)
Creates a Java SubAckReasonCode enum value from a native integer value.int
getValue()
static SubAckPacket.SubAckReasonCode
valueOf(String name)
Returns the enum constant of this type with the specified name.static SubAckPacket.SubAckReasonCode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GRANTED_QOS_0
public static final SubAckPacket.SubAckReasonCode GRANTED_QOS_0
Returned when the subscription was accepted and the maximum QoS sent will be QoS 0.
-
GRANTED_QOS_1
public static final SubAckPacket.SubAckReasonCode GRANTED_QOS_1
Returned when the subscription was accepted and the maximum QoS sent will be QoS 1.
-
GRANTED_QOS_2
public static final SubAckPacket.SubAckReasonCode GRANTED_QOS_2
Returned when the subscription was accepted and the maximum QoS sent will be QoS 2.
-
UNSPECIFIED_ERROR
public static final SubAckPacket.SubAckReasonCode UNSPECIFIED_ERROR
Returned when the connection was closed but the sender does not want to specify a reason or none of the other reason codes apply.
-
IMPLEMENTATION_SPECIFIC_ERROR
public static final SubAckPacket.SubAckReasonCode IMPLEMENTATION_SPECIFIC_ERROR
Returned when the subscription was valid but the server did not accept it.
-
NOT_AUTHORIZED
public static final SubAckPacket.SubAckReasonCode NOT_AUTHORIZED
Returned when the client was not authorized to make the subscription on the server.
-
TOPIC_FILTER_INVALID
public static final SubAckPacket.SubAckReasonCode TOPIC_FILTER_INVALID
Returned when the subscription topic filter was correctly formed but not allowed for the client.
-
PACKET_IDENTIFIER_IN_USE
public static final SubAckPacket.SubAckReasonCode PACKET_IDENTIFIER_IN_USE
Returned when the packet identifier was already in use on the server.
-
QUOTA_EXCEEDED
public static final SubAckPacket.SubAckReasonCode QUOTA_EXCEEDED
Returned when a subscribe-related quota set on the server was exceeded.
-
SHARED_SUBSCRIPTIONS_NOT_SUPPORTED
public static final SubAckPacket.SubAckReasonCode SHARED_SUBSCRIPTIONS_NOT_SUPPORTED
Returned when the subscription's topic filter was a shared subscription and the server does not support shared subscriptions.
-
SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED
public static final SubAckPacket.SubAckReasonCode SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED
Returned when the SubscribePacket contained a subscription identifier and the server does not support subscription identifiers.
-
WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED
public static final SubAckPacket.SubAckReasonCode WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED
Returned when the subscription's topic filter contains a wildcard but the server does not support wildcard subscriptions.
-
-
Method Detail
-
values
public static SubAckPacket.SubAckReasonCode[] 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 (SubAckPacket.SubAckReasonCode c : SubAckPacket.SubAckReasonCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SubAckPacket.SubAckReasonCode 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 SubAckPacket.SubAckReasonCode getEnumValueFromInteger(int value)
Creates a Java SubAckReasonCode enum value from a native integer value.- Parameters:
value
- native integer value for SubAckReasonCode- Returns:
- a new SubAckReasonCode value
-
-