Enum ConnackReasonCode
- All Implemented Interfaces:
Serializable,Comparable<ConnackReasonCode>,Constable
public enum ConnackReasonCode extends Enum<ConnackReasonCode>
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:
| 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
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description BAD_AUTHENTICATION_METHODFor an MQTT 3 client this will be translated to the return code REFUSED_BAD_USERNAME_OR_PASSWORD.BAD_USER_NAME_OR_PASSWORDFor an MQTT 3 client this will be translated to the return code REFUSED_BAD_USERNAME_OR_PASSWORD.BANNEDFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.CLIENT_IDENTIFIER_NOT_VALIDFor an MQTT 3 client this will be translated to the return code REFUSED_IDENTIFIER_REJECTED.CONNECTION_RATE_EXCEEDEDFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.IMPLEMENTATION_SPECIFIC_ERRORFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.MALFORMED_PACKETFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.NOT_AUTHORIZEDFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.PACKET_TOO_LARGEFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.PAYLOAD_FORMAT_INVALIDFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.PROTOCOL_ERRORFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.QOS_NOT_SUPPORTEDFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.QUOTA_EXCEEDEDFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.RETAIN_NOT_SUPPORTEDFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.SERVER_BUSYFor an MQTT 3 client this will be translated to the return code REFUSED_SERVER_UNAVAILABLE.SERVER_MOVEDFor an MQTT 3 client this will be translated to the return code REFUSED_SERVER_UNAVAILABLE.SERVER_UNAVAILABLEFor an MQTT 3 client this will be translated to the return code REFUSED_SERVER_UNAVAILABLE.SUCCESSFor an MQTT 3 client this will be translated to the return code ACCEPTED.TOPIC_NAME_INVALIDFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.UNSPECIFIED_ERRORFor an MQTT 3 client this will be translated to the return code REFUSED_NOT_AUTHORIZED.UNSUPPORTED_PROTOCOL_VERSIONFor an MQTT 3 client this will be translated to the return code REFUSED_UNACCEPTABLE_PROTOCOL_VERSION.USE_ANOTHER_SERVERFor an MQTT 3 client this will be translated to the return code REFUSED_SERVER_UNAVAILABLE. -
Method Summary
Modifier and Type Method Description static ConnackReasonCodevalueOf(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 Details
-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 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
-