Home / Class/ ConnAckPropertiesBuilder Class — netty Architecture

ConnAckPropertiesBuilder Class — netty Architecture

Architecture documentation for the ConnAckPropertiesBuilder class in MqttMessageBuilders.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  103d52ab_3ee5_6921_bb9c_57343a8c1b5a["ConnAckPropertiesBuilder"]
  7d541d48_e599_e4df_7154_8f69a769e3a4["MqttMessageBuilders.java"]
  103d52ab_3ee5_6921_bb9c_57343a8c1b5a -->|defined in| 7d541d48_e599_e4df_7154_8f69a769e3a4
  3087350b_f15c_607d_0e31_1c0ee9846197["MqttProperties()"]
  103d52ab_3ee5_6921_bb9c_57343a8c1b5a -->|method| 3087350b_f15c_607d_0e31_1c0ee9846197
  9d573bac_a9e6_59f9_eadf_368805785b23["ConnAckPropertiesBuilder()"]
  103d52ab_3ee5_6921_bb9c_57343a8c1b5a -->|method| 9d573bac_a9e6_59f9_eadf_368805785b23

Relationship Graph

Source Code

codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttMessageBuilders.java lines 349–519

    public static final class ConnAckPropertiesBuilder {
        private String clientId;
        private Long sessionExpiryInterval;
        private int receiveMaximum;
        private Byte maximumQos;
        private boolean retain;
        private Long maximumPacketSize;
        private int topicAliasMaximum;
        private String reasonString;
        private final MqttProperties.UserProperties userProperties = new MqttProperties.UserProperties();
        private Boolean wildcardSubscriptionAvailable;
        private Boolean subscriptionIdentifiersAvailable;
        private Boolean sharedSubscriptionAvailable;
        private Integer serverKeepAlive;
        private String responseInformation;
        private String serverReference;
        private String authenticationMethod;
        private byte[] authenticationData;

        public MqttProperties build() {
            final MqttProperties props = new MqttProperties();
            if (clientId != null) {
                props.add(new MqttProperties.StringProperty(MqttProperties.ASSIGNED_CLIENT_IDENTIFIER,
                        clientId));
            }
            if (sessionExpiryInterval != null) {
                props.add(new MqttProperties.IntegerProperty(
                        MqttProperties.SESSION_EXPIRY_INTERVAL, sessionExpiryInterval.intValue()));
            }
            if (receiveMaximum > 0) {
                props.add(new MqttProperties.IntegerProperty(MqttProperties.RECEIVE_MAXIMUM, receiveMaximum));
            }
            if (maximumQos != null) {
                props.add(new MqttProperties.IntegerProperty(MqttProperties.MAXIMUM_QOS,
                        maximumQos.intValue()));
            }
            props.add(new MqttProperties.IntegerProperty(MqttProperties.RETAIN_AVAILABLE, retain ? 1 : 0));
            if (maximumPacketSize != null) {
                props.add(new MqttProperties.IntegerProperty(MqttProperties.MAXIMUM_PACKET_SIZE,
                        maximumPacketSize.intValue()));
            }
            props.add(new MqttProperties.IntegerProperty(MqttProperties.TOPIC_ALIAS_MAXIMUM,
                    topicAliasMaximum));
            if (reasonString != null) {
                props.add(new MqttProperties.StringProperty(MqttProperties.REASON_STRING, reasonString));
            }
            props.add(userProperties);
            if (wildcardSubscriptionAvailable != null) {
                props.add(new MqttProperties.IntegerProperty(MqttProperties.WILDCARD_SUBSCRIPTION_AVAILABLE,
                        wildcardSubscriptionAvailable ? 1 : 0));
            }
            if (subscriptionIdentifiersAvailable != null) {
                props.add(new MqttProperties.IntegerProperty(MqttProperties.SUBSCRIPTION_IDENTIFIER_AVAILABLE,
                        subscriptionIdentifiersAvailable ? 1 : 0));
            }
            if (sharedSubscriptionAvailable != null) {
                props.add(new MqttProperties.IntegerProperty(MqttProperties.SHARED_SUBSCRIPTION_AVAILABLE,
                        sharedSubscriptionAvailable ? 1 : 0));
            }
            if (serverKeepAlive != null) {
                props.add(new MqttProperties.IntegerProperty(MqttProperties.SERVER_KEEP_ALIVE,
                        serverKeepAlive));
            }
            if (responseInformation != null) {
                props.add(new MqttProperties.StringProperty(MqttProperties.RESPONSE_INFORMATION,
                        responseInformation));
            }
            if (serverReference != null) {
                props.add(new MqttProperties.StringProperty(MqttProperties.SERVER_REFERENCE,
                        serverReference));
            }
            if (authenticationMethod != null) {
                props.add(new MqttProperties.StringProperty(MqttProperties.AUTHENTICATION_METHOD,
                        authenticationMethod));
            }
            if (authenticationData != null) {
                props.add(new MqttProperties.BinaryProperty(MqttProperties.AUTHENTICATION_DATA,
                        authenticationData));
            }

            return props;

Frequently Asked Questions

What is the ConnAckPropertiesBuilder class?
ConnAckPropertiesBuilder is a class in the netty codebase, defined in codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttMessageBuilders.java.
Where is ConnAckPropertiesBuilder defined?
ConnAckPropertiesBuilder is defined in codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttMessageBuilders.java at line 349.

Analyze Your Own Codebase

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

Try Supermodel Free