All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hivemq.extension.sdk.api.packets.connect.ConnackReasonCode Maven / Gradle / Ivy

There is a newer version: 4.35.0
Show newest version
/*
 * 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 codeConnackReasonCode
ACCEPTEDSUCCESS
REFUSED_UNACCEPTABLE_PROTOCOL_VERSIONUNSUPPORTED_PROTOCOL_VERSION
REFUSED_IDENTIFIER_REJECTEDCLIENT_IDENTIFIER_NOT_VALID
REFUSED_SERVER_UNAVAILABLESERVER_UNAVAILABLE, SERVER_BUSY, USE_ANOTHER_SERVER, SERVER_MOVED
REFUSED_BAD_USERNAME_OR_PASSWORDBAD_USER_NAME_OR_PASSWORD, BAD_AUTHENTICATION_METHOD
REFUSED_NOT_AUTHORIZEDNOT_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 }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy