Class MqttConnAckMessage

java.lang.Object
io.vertx.reactivex.mqtt.messages.MqttConnAckMessage
All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate

public class MqttConnAckMessage extends Object implements io.vertx.lang.rx.RxDelegate
Represents an MQTT CONNACK message.

MQTT 3.1.1: exposes code() and isSessionPresent(). MQTT 5.0: additionally exposes all CONNACK properties via typed accessors.

NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.

  • Field Details

    • __TYPE_ARG

      public static final io.vertx.lang.rx.TypeArg<MqttConnAckMessage> __TYPE_ARG
  • Constructor Details

    • MqttConnAckMessage

      public MqttConnAckMessage(MqttConnAckMessage delegate)
    • MqttConnAckMessage

      public MqttConnAckMessage(Object delegate)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getDelegate

      public MqttConnAckMessage getDelegate()
      Specified by:
      getDelegate in interface io.vertx.lang.rx.RxDelegate
    • create

      public static MqttConnAckMessage create(MqttConnectReturnCode code, boolean isSessionPresent)
      Create a concrete instance of a Vert.x connack message
      Parameters:
      code - return code from the connection request
      isSessionPresent - whether an old session is present
      Returns:
      the connack message
    • code

      public MqttConnectReturnCode code()
      Returns:
      return code from the connection request
    • isSessionPresent

      public boolean isSessionPresent()
      Returns:
      whether an old session is present on the server
    • sessionExpiryInterval

      public Long sessionExpiryInterval()
      Session Expiry Interval in seconds assigned by the server. (MQTT 5.0)

      If present, overrides the value sent by the client in the CONNECT packet.

      Returns:
      the session expiry interval, or null if not present
    • receiveMaximum

      public Integer receiveMaximum()
      Receive Maximum: the maximum number of QoS 1 and QoS 2 publications the server is willing to process concurrently. (MQTT 5.0)
      Returns:
      the receive maximum, or null if not present
    • maximumQos

      public Integer maximumQos()
      Maximum QoS level the server supports. (MQTT 5.0)

      0 = QoS 0 only, 1 = QoS 0 and 1. If absent, QoS 2 is supported.

      Returns:
      0 or 1, or null if absent (meaning QoS 2 is supported)
    • retainAvailable

      public Boolean retainAvailable()
      Whether the server supports retained messages. (MQTT 5.0)
      Returns:
      false if the server does NOT support retain; null if absent (meaning retain IS supported)
    • subscriptionIdentifierAvailable

      public Boolean subscriptionIdentifierAvailable()
      Whether the server supports Subscription Identifiers. (MQTT 5.0)

      If the server sends 0, the client MUST NOT include a SUBSCRIPTION_IDENTIFIER property in any SUBSCRIBE packet. If absent, subscription identifiers are supported (default = 1).

      Returns:
      false if subscription identifiers are NOT supported; null if absent (meaning they ARE supported)
    • wildcardSubscriptionAvailable

      public Boolean wildcardSubscriptionAvailable()
      Whether the server supports Wildcard Subscriptions. (MQTT 5.0 §3.2.2.3.11)

      If the server sends 0, the client MUST NOT send SUBSCRIBE packets with wildcard topic filters. If absent, wildcard subscriptions are supported (default = 1).

      Returns:
      false if wildcard subscriptions are NOT supported; null if absent (meaning they ARE supported)
    • sharedSubscriptionAvailable

      public Boolean sharedSubscriptionAvailable()
      Whether the server supports Shared Subscriptions. (MQTT 5.0 §3.2.2.3.14)

      If the server sends 0, the client MUST NOT send SUBSCRIBE packets with shared topic filters ($share/...). If absent, shared subscriptions are supported (default = 1).

      Returns:
      false if shared subscriptions are NOT supported; null if absent (meaning they ARE supported)
    • maximumPacketSize

      public Long maximumPacketSize()
      Maximum packet size the server is willing to accept, in bytes. (MQTT 5.0)
      Returns:
      the maximum packet size, or null if not present (meaning no limit)
    • assignedClientIdentifier

      public String assignedClientIdentifier()
      Client Identifier assigned by the server. (MQTT 5.0)

      Present only when the client connected with an empty ClientID and the server assigned one.

      Returns:
      the assigned client identifier, or null if not present
    • topicAliasMaximum

      public Integer topicAliasMaximum()
      Topic Alias Maximum: the highest value accepted by the server as a Topic Alias. (MQTT 5.0)
      Returns:
      the topic alias maximum, or null if not present (meaning 0, i.e. no aliases)
    • reasonString

      public String reasonString()
      Human-readable reason string for the result of the connection attempt. (MQTT 5.0)
      Returns:
      the reason string, or null if not present
    • userProperties

      public Map<String,String> userProperties()
      User Properties returned by the server in the CONNACK. (MQTT 5.0)

      Note: MQTT 5.0 allows duplicate keys; duplicate values are silently collapsed to the last value when using this Map representation.

      Returns:
      key-value user properties, or null if not present
    • serverKeepAlive

      public Integer serverKeepAlive()
      Keep Alive interval (in seconds) assigned by the server. (MQTT 5.0)

      If present, the client MUST use this value instead of the one it sent.

      Returns:
      the server keep alive, or null if the client-requested value should be used
    • responseInformation

      public String responseInformation()
      Response Information used to construct the Response Topic. (MQTT 5.0)

      Only returned if the client set Request Response Information = 1 in CONNECT.

      Returns:
      the response information string, or null if not present
    • serverReference

      public String serverReference()
      Server Reference: another server the client should use to reconnect. (MQTT 5.0)

      Present when the server wants the client to use a different server.

      Returns:
      the server reference, or null if not present
    • authenticationMethod

      public String authenticationMethod()
      Authentication Method used during enhanced authentication. (MQTT 5.0)
      Returns:
      the authentication method name, or null if not present
    • authenticationData

      public Buffer authenticationData()
      Authentication Data used during enhanced authentication. (MQTT 5.0)
      Returns:
      the authentication data, or null if not present
    • create

      public static MqttConnAckMessage create(MqttConnectReturnCode code, boolean isSessionPresent, MqttProperties properties)
      Create a concrete instance of a Vert.x connack message with MQTT properties.
      Parameters:
      code - return code from the connection request
      isSessionPresent - whether an old session is present
      properties - MQTT properties (MQTT 5.0)
      Returns:
      the connack message
    • properties

      public MqttProperties properties()
      Raw access to MQTT properties. Use the typed accessors below when possible.
      Returns:
      the raw MqttProperties object
    • newInstance

      public static MqttConnAckMessage newInstance(MqttConnAckMessage arg)