
com.hivemq.extension.sdk.api.packets.connect.ConnackReasonCode Maven / Gradle / Ivy
Show all versions of hivemq-extension-sdk Show documentation
/*
* Copyright 2018-present HiveMQ GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hivemq.extension.sdk.api.packets.connect;
/**
* 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
*
*
*
*
* @author Christoph Schäbel
* @since 4.0.0, CE 2019.1
*/
public enum ConnackReasonCode {
/**
* 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
*/
SUCCESS,
/**
* 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
*/
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_UNACCEPTABLE_PROTOCOL_VERSION.
*
* 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_IDENTIFIER_REJECTED.
*
* 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_BAD_USERNAME_OR_PASSWORD.
*
* 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_NOT_AUTHORIZED.
*
* 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_SERVER_UNAVAILABLE.
*
* 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_NOT_AUTHORIZED.
*
* 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_BAD_USERNAME_OR_PASSWORD.
*
* 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_NOT_AUTHORIZED.
*
* 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_SERVER_UNAVAILABLE.
*
* 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_NOT_AUTHORIZED.
*
* This is an unsuccessful code.
*
* @since 4.0.0, CE 2019.1
*/
CONNECTION_RATE_EXCEEDED
}