Home / Type/ PubAck Type — netty Architecture

PubAck Type — netty Architecture

Architecture documentation for the PubAck type/interface in MqttReasonCodes.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  71b19f70_2af7_2365_b6ce_978c1abf3374["PubAck"]
  c504338c_2902_e532_6aaa_70ad4dab253e["MqttReasonCodes.java"]
  71b19f70_2af7_2365_b6ce_978c1abf3374 -->|defined in| c504338c_2902_e532_6aaa_70ad4dab253e
  style 71b19f70_2af7_2365_b6ce_978c1abf3374 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttReasonCodes.java lines 151–194

    public enum PubAck {
        SUCCESS((byte) 0x00),
        NO_MATCHING_SUBSCRIBERS((byte) 0x10),
        UNSPECIFIED_ERROR((byte) 0x80),
        IMPLEMENTATION_SPECIFIC_ERROR((byte) 0x83),
        NOT_AUTHORIZED((byte) 0x87),
        TOPIC_NAME_INVALID((byte) 0x90),
        PACKET_IDENTIFIER_IN_USE((byte) 0x91),
        QUOTA_EXCEEDED((byte) 0x97),
        PAYLOAD_FORMAT_INVALID((byte) 0x99);

        private static final PubAck[] VALUES;

        static {
            PubAck[] values = values();
            VALUES = new PubAck[154];
            for (PubAck code : values) {
                final int unsignedByte = code.byteValue & 0xFF;
                // Suppress a warning about out of bounds access since the enum contains only correct values
                VALUES[unsignedByte] = code;    //  [java/index-out-of-bounds]
            }
        }

        private final byte byteValue;

        PubAck(byte byteValue) {
            this.byteValue = byteValue;
        }

        /**
         * @return the value number corresponding to the constant.
         * */
        public byte byteValue() {
            return byteValue;
        }

        /**
         * @param b the number to decode.
         * @return the enum value corresponding to the number.
         * */
        public static PubAck valueOf(byte b) {
            return valueOfHelper(b, VALUES);
        }
    }

Frequently Asked Questions

What is the PubAck type?
PubAck is a type/interface in the netty codebase, defined in codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttReasonCodes.java.
Where is PubAck defined?
PubAck is defined in codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttReasonCodes.java at line 151.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free