Enum ConnackReasonCode
- java.lang.Object
-
- java.lang.Enum<ConnackReasonCode>
-
- com.hivemq.extension.sdk.api.packets.connect.ConnackReasonCode
-
- All Implemented Interfaces:
Serializable
,Comparable<ConnackReasonCode>
public enum ConnackReasonCode extends Enum<ConnackReasonCode>
Reason code for the MQTT CONNACK packet.These reason codes represent the MQTT 5 reason codes.
For MQTT version 3.1 and 3.1.1 these reason codes are automatically translated by HiveMQ.
The reason codes are translated as follows:
Reason code mapping MQTT 3 CONNACK reason code ConnackReasonCode ACCEPTED SUCCESS REFUSED_UNACCEPTABLE_PROTOCOL_VERSION UNSUPPORTED_PROTOCOL_VERSION REFUSED_IDENTIFIER_REJECTED CLIENT_IDENTIFIER_NOT_VALID REFUSED_SERVER_UNAVAILABLE SERVER_UNAVAILABLE, SERVER_BUSY, USE_ANOTHER_SERVER, SERVER_MOVED REFUSED_BAD_USERNAME_OR_PASSWORD BAD_USER_NAME_OR_PASSWORD, BAD_AUTHENTICATION_METHOD REFUSED_NOT_AUTHORIZED NOT_AUTHORIZED, UNSPECIFIED_ERROR, MALFORMED_PACKET, PROTOCOL_ERROR, IMPLEMENTATION_SPECIFIC_ERROR, BANNED, TOPIC_NAME_INVALID, PACKET_TOO_LARGE, QUOTA_EXCEEDED, PAYLOAD_FORMAT_INVALID, RETAIN_NOT_SUPPORTED, QOS_NOT_SUPPORTED, CONNECTION_RATE_EXCEEDED - Since:
- 4.0.0, CE 2019.1
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BAD_AUTHENTICATION_METHOD
For an MQTT 3 client this will be translated to the return code REFUSED_BAD_USERNAME_OR_PASSWORD.BAD_USER_NAME_OR_PASSWORD
For an MQTT 3 client this will be translated to the return code REFUSED_BAD_USERNAME_OR_PASSWORD.BANNED
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.CLIENT_IDENTIFIER_NOT_VALID
For an MQTT 3 client this will be translated to the return code REFUSED_IDENTIFIER_REJECTED.CONNECTION_RATE_EXCEEDED
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.IMPLEMENTATION_SPECIFIC_ERROR
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.MALFORMED_PACKET
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.NOT_AUTHORIZED
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.PACKET_TOO_LARGE
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.PAYLOAD_FORMAT_INVALID
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.PROTOCOL_ERROR
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.QOS_NOT_SUPPORTED
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.QUOTA_EXCEEDED
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.RETAIN_NOT_SUPPORTED
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.SERVER_BUSY
For an MQTT 3 client this will be translated to the return code REFUSED_SERVER_UNAVAILABLE.SERVER_MOVED
For an MQTT 3 client this will be translated to the return code REFUSED_SERVER_UNAVAILABLE.SERVER_UNAVAILABLE
For an MQTT 3 client this will be translated to the return code REFUSED_SERVER_UNAVAILABLE.SUCCESS
For an MQTT 3 client this will be translated to the return code ACCEPTED.TOPIC_NAME_INVALID
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.UNSPECIFIED_ERROR
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.UNSUPPORTED_PROTOCOL_VERSION
For an MQTT 3 client this will be translated to the return code REFUSED_UNACCEPTABLE_PROTOCOL_VERSION.USE_ANOTHER_SERVER
For an MQTT 3 client this will be translated to the return code REFUSED_SERVER_UNAVAILABLE.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConnackReasonCode
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConnackReasonCode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SUCCESS
public static final ConnackReasonCode SUCCESS
For an MQTT 3 client this will be translated to the return code ACCEPTED.This is a success code.
- Since:
- 4.0.0, CE 2019.1
-
UNSPECIFIED_ERROR
public static final ConnackReasonCode UNSPECIFIED_ERROR
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
MALFORMED_PACKET
public static final ConnackReasonCode MALFORMED_PACKET
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
PROTOCOL_ERROR
public static final ConnackReasonCode PROTOCOL_ERROR
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
IMPLEMENTATION_SPECIFIC_ERROR
public static final ConnackReasonCode IMPLEMENTATION_SPECIFIC_ERROR
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
UNSUPPORTED_PROTOCOL_VERSION
public static final ConnackReasonCode UNSUPPORTED_PROTOCOL_VERSION
For an MQTT 3 client this will be translated to the return code REFUSED_UNACCEPTABLE_PROTOCOL_VERSION.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
CLIENT_IDENTIFIER_NOT_VALID
public static final ConnackReasonCode CLIENT_IDENTIFIER_NOT_VALID
For an MQTT 3 client this will be translated to the return code REFUSED_IDENTIFIER_REJECTED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
BAD_USER_NAME_OR_PASSWORD
public static final ConnackReasonCode BAD_USER_NAME_OR_PASSWORD
For an MQTT 3 client this will be translated to the return code REFUSED_BAD_USERNAME_OR_PASSWORD.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
NOT_AUTHORIZED
public static final ConnackReasonCode NOT_AUTHORIZED
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
SERVER_UNAVAILABLE
public static final ConnackReasonCode SERVER_UNAVAILABLE
For an MQTT 3 client this will be translated to the return code REFUSED_SERVER_UNAVAILABLE.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
SERVER_BUSY
public static final ConnackReasonCode SERVER_BUSY
For an MQTT 3 client this will be translated to the return code REFUSED_SERVER_UNAVAILABLE.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
BANNED
public static final ConnackReasonCode BANNED
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
BAD_AUTHENTICATION_METHOD
public static final ConnackReasonCode BAD_AUTHENTICATION_METHOD
For an MQTT 3 client this will be translated to the return code REFUSED_BAD_USERNAME_OR_PASSWORD.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
TOPIC_NAME_INVALID
public static final ConnackReasonCode TOPIC_NAME_INVALID
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
PACKET_TOO_LARGE
public static final ConnackReasonCode PACKET_TOO_LARGE
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
QUOTA_EXCEEDED
public static final ConnackReasonCode QUOTA_EXCEEDED
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
PAYLOAD_FORMAT_INVALID
public static final ConnackReasonCode PAYLOAD_FORMAT_INVALID
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
RETAIN_NOT_SUPPORTED
public static final ConnackReasonCode RETAIN_NOT_SUPPORTED
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
QOS_NOT_SUPPORTED
public static final ConnackReasonCode QOS_NOT_SUPPORTED
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
USE_ANOTHER_SERVER
public static final ConnackReasonCode USE_ANOTHER_SERVER
For an MQTT 3 client this will be translated to the return code REFUSED_SERVER_UNAVAILABLE.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
SERVER_MOVED
public static final ConnackReasonCode SERVER_MOVED
For an MQTT 3 client this will be translated to the return code REFUSED_SERVER_UNAVAILABLE.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
CONNECTION_RATE_EXCEEDED
public static final ConnackReasonCode CONNECTION_RATE_EXCEEDED
For an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.This is an unsuccessful code.
- Since:
- 4.0.0, CE 2019.1
-
-
Method Detail
-
values
public static ConnackReasonCode[] 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 (ConnackReasonCode c : ConnackReasonCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConnackReasonCode 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
-
-