Enum ConnAckPacket.ConnectReasonCode
- java.lang.Object
-
- java.lang.Enum<ConnAckPacket.ConnectReasonCode>
-
- software.amazon.awssdk.crt.mqtt5.packets.ConnAckPacket.ConnectReasonCode
-
- All Implemented Interfaces:
Serializable
,Comparable<ConnAckPacket.ConnectReasonCode>
- Enclosing class:
- ConnAckPacket
public static enum ConnAckPacket.ConnectReasonCode extends Enum<ConnAckPacket.ConnectReasonCode>
Server return code for connect attempts. Enum values match MQTT5 spec encoding values.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BAD_AUTHENTICATION_METHOD
Returned when the authentication method used in the connection is either nor supported on the server or it does not match the authentication method currently in use in the ConnectPacket.BAD_USERNAME_OR_PASSWORD
Returned when the server does not accept the username and/or password specified by the client in the connection packet.BANNED
Returned when the client has been banned by the server.CLIENT_IDENTIFIER_NOT_VALID
Returned when the client identifier in the ConnectPacket is a valid string but not one that is allowed on the server.CONNECTION_RATE_EXCEEDED
Returned when the server connection rate limit has been exceeded.IMPLEMENTATION_SPECIFIC_ERROR
Returned when the ConnectPacket is valid but was not accepted by the server.MALFORMED_PACKET
Returned when data in the ConnectPacket could not be correctly parsed by the server.NOT_AUTHORIZED
Returned when the client is not authorized to connect to the server.PACKET_TOO_LARGE
Returned when the ConnectPacket exceeded the maximum permissible size on the server.PAYLOAD_FORMAT_INVALID
Returned when the Will payload in the ConnectPacket does not match the specified payload format indicator.PROTOCOL_ERROR
Returned when data in the ConnectPacket does not conform to the MQTT5 specification requirements.QOS_NOT_SUPPORTED
Returned when the server does not support the QOS setting set in the Will QOS in the ConnectPacket.QUOTA_EXCEEDED
Returned when the quota limits set on the server have been met and/or exceeded.RETAIN_NOT_SUPPORTED
Returned when the server does not retain messages but the ConnectPacket on the client had Will retain enabled.SERVER_BUSY
Returned when the server is too busy to make a connection.SERVER_MOVED
Returned when the server is telling the client to permanently use another server instead of the one they are trying to connect to.SERVER_UNAVAILABLE
Returned when the MQTT5 server is not available.SUCCESS
Returned when the connection is accepted.TOPIC_NAME_INVALID
Returned when the Will topic name sent in the ConnectPacket is correctly formed, but is not accepted by the server.UNSPECIFIED_ERROR
Returned when the server has a failure but does not want to specify a reason or none of the other reason codes apply.UNSUPPORTED_PROTOCOL_VERSION
Returned when the server does not support MQTT5 protocol version specified in the connection.USE_ANOTHER_SERVER
Returned when the server is telling the client to temporarily use another server instead of the one they are trying to connect to.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConnAckPacket.ConnectReasonCode
getEnumValueFromInteger(int value)
Creates a Java ConnectReasonCode enum value from a native integer value.int
getValue()
static ConnAckPacket.ConnectReasonCode
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConnAckPacket.ConnectReasonCode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SUCCESS
public static final ConnAckPacket.ConnectReasonCode SUCCESS
Returned when the connection is accepted.
-
UNSPECIFIED_ERROR
public static final ConnAckPacket.ConnectReasonCode UNSPECIFIED_ERROR
Returned when the server has a failure but does not want to specify a reason or none of the other reason codes apply.
-
MALFORMED_PACKET
public static final ConnAckPacket.ConnectReasonCode MALFORMED_PACKET
Returned when data in the ConnectPacket could not be correctly parsed by the server.
-
PROTOCOL_ERROR
public static final ConnAckPacket.ConnectReasonCode PROTOCOL_ERROR
Returned when data in the ConnectPacket does not conform to the MQTT5 specification requirements.
-
IMPLEMENTATION_SPECIFIC_ERROR
public static final ConnAckPacket.ConnectReasonCode IMPLEMENTATION_SPECIFIC_ERROR
Returned when the ConnectPacket is valid but was not accepted by the server.
-
UNSUPPORTED_PROTOCOL_VERSION
public static final ConnAckPacket.ConnectReasonCode UNSUPPORTED_PROTOCOL_VERSION
Returned when the server does not support MQTT5 protocol version specified in the connection.
-
CLIENT_IDENTIFIER_NOT_VALID
public static final ConnAckPacket.ConnectReasonCode CLIENT_IDENTIFIER_NOT_VALID
Returned when the client identifier in the ConnectPacket is a valid string but not one that is allowed on the server.
-
BAD_USERNAME_OR_PASSWORD
public static final ConnAckPacket.ConnectReasonCode BAD_USERNAME_OR_PASSWORD
Returned when the server does not accept the username and/or password specified by the client in the connection packet.
-
NOT_AUTHORIZED
public static final ConnAckPacket.ConnectReasonCode NOT_AUTHORIZED
Returned when the client is not authorized to connect to the server.
-
SERVER_UNAVAILABLE
public static final ConnAckPacket.ConnectReasonCode SERVER_UNAVAILABLE
Returned when the MQTT5 server is not available.
-
SERVER_BUSY
public static final ConnAckPacket.ConnectReasonCode SERVER_BUSY
Returned when the server is too busy to make a connection. It is recommended that the client try again later.
-
BANNED
public static final ConnAckPacket.ConnectReasonCode BANNED
Returned when the client has been banned by the server.
-
BAD_AUTHENTICATION_METHOD
public static final ConnAckPacket.ConnectReasonCode BAD_AUTHENTICATION_METHOD
Returned when the authentication method used in the connection is either nor supported on the server or it does not match the authentication method currently in use in the ConnectPacket.
-
TOPIC_NAME_INVALID
public static final ConnAckPacket.ConnectReasonCode TOPIC_NAME_INVALID
Returned when the Will topic name sent in the ConnectPacket is correctly formed, but is not accepted by the server.
-
PACKET_TOO_LARGE
public static final ConnAckPacket.ConnectReasonCode PACKET_TOO_LARGE
Returned when the ConnectPacket exceeded the maximum permissible size on the server.
-
QUOTA_EXCEEDED
public static final ConnAckPacket.ConnectReasonCode QUOTA_EXCEEDED
Returned when the quota limits set on the server have been met and/or exceeded.
-
PAYLOAD_FORMAT_INVALID
public static final ConnAckPacket.ConnectReasonCode PAYLOAD_FORMAT_INVALID
Returned when the Will payload in the ConnectPacket does not match the specified payload format indicator.
-
RETAIN_NOT_SUPPORTED
public static final ConnAckPacket.ConnectReasonCode RETAIN_NOT_SUPPORTED
Returned when the server does not retain messages but the ConnectPacket on the client had Will retain enabled.
-
QOS_NOT_SUPPORTED
public static final ConnAckPacket.ConnectReasonCode QOS_NOT_SUPPORTED
Returned when the server does not support the QOS setting set in the Will QOS in the ConnectPacket.
-
USE_ANOTHER_SERVER
public static final ConnAckPacket.ConnectReasonCode USE_ANOTHER_SERVER
Returned when the server is telling the client to temporarily use another server instead of the one they are trying to connect to.
-
SERVER_MOVED
public static final ConnAckPacket.ConnectReasonCode SERVER_MOVED
Returned when the server is telling the client to permanently use another server instead of the one they are trying to connect to.
-
CONNECTION_RATE_EXCEEDED
public static final ConnAckPacket.ConnectReasonCode CONNECTION_RATE_EXCEEDED
Returned when the server connection rate limit has been exceeded.
-
-
Method Detail
-
values
public static ConnAckPacket.ConnectReasonCode[] 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 (ConnAckPacket.ConnectReasonCode c : ConnAckPacket.ConnectReasonCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConnAckPacket.ConnectReasonCode 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 ConnAckPacket.ConnectReasonCode getEnumValueFromInteger(int value)
Creates a Java ConnectReasonCode enum value from a native integer value.- Parameters:
value
- native integer value for ConnectReasonCode- Returns:
- a new ConnectReasonCode value
-
-