Interface Mqtt5ConnectRestrictions


@DoNotImplement public interface Mqtt5ConnectRestrictions
Restrictions set by the client in an MQTT 5 Connect message.

These restrictions consist of:

Since:
1.0
  • Field Details

    • DEFAULT_RECEIVE_MAXIMUM

      static final int DEFAULT_RECEIVE_MAXIMUM
      The default maximum amount of not acknowledged publishes with QoS 1 or 2 the client accepts from the server concurrently.
      See Also:
    • DEFAULT_SEND_MAXIMUM

      static final int DEFAULT_SEND_MAXIMUM
      The default maximum amount of not acknowledged publishes with QoS 1 or 2 the client sends to the server concurrently.
      See Also:
    • DEFAULT_MAXIMUM_PACKET_SIZE

      static final int DEFAULT_MAXIMUM_PACKET_SIZE
      The default maximum packet size the client accepts from the server. By default the packet size is not limited beyond the restrictions of the encoding.
      See Also:
    • DEFAULT_SEND_MAXIMUM_PACKET_SIZE

      static final int DEFAULT_SEND_MAXIMUM_PACKET_SIZE
      The default maximum packet size the client sends to the server. By default the packet size is not limited beyond the restrictions of the encoding.
      See Also:
    • DEFAULT_TOPIC_ALIAS_MAXIMUM

      static final int DEFAULT_TOPIC_ALIAS_MAXIMUM
      The default maximum amount of topic aliases the client accepts from the server.
      See Also:
    • DEFAULT_SEND_TOPIC_ALIAS_MAXIMUM

      static final int DEFAULT_SEND_TOPIC_ALIAS_MAXIMUM
      The default maximum amount of topic aliases the client sends to the server.
      See Also:
    • DEFAULT_REQUEST_PROBLEM_INFORMATION

      static final boolean DEFAULT_REQUEST_PROBLEM_INFORMATION
      Default whether the client accepts problem information from the server.
      See Also:
    • DEFAULT_REQUEST_RESPONSE_INFORMATION

      static final boolean DEFAULT_REQUEST_RESPONSE_INFORMATION
      Default whether the client requests problem information from the server.
      See Also:
  • Method Details

    • builder

      Creates a builder for Connect restrictions.
      Returns:
      the created builder.
    • getReceiveMaximum

      int getReceiveMaximum()
      Returns the maximum amount of not acknowledged publishes with QoS 1 or 2 the client accepts from the server concurrently. The default is DEFAULT_RECEIVE_MAXIMUM.
      Returns:
      the maximum amount of not acknowledged publishes with QoS 1 or 2 the client accepts from the server concurrently.
    • getSendMaximum

      int getSendMaximum()
      Returns the maximum amount of not acknowledged publishes with QoS 1 or 2 the client sends to the server concurrently. The default is DEFAULT_SEND_MAXIMUM.

      The actual amount a connected client will use is determined by the minimum of this value and MqttConnAckRestrictions#getReceiveMaximum().

      Returns:
      the maximum amount of not acknowledged publishes with QoS 1 or 2 the client sends to the server concurrently.
    • getMaximumPacketSize

      int getMaximumPacketSize()
      Returns the maximum packet size the client accepts from the server. The default is DEFAULT_MAXIMUM_PACKET_SIZE.
      Returns:
      the maximum packet size the client accepts from the server.
    • getSendMaximumPacketSize

      int getSendMaximumPacketSize()
      Returns the maximum packet size the client sends to the server. The default is DEFAULT_SEND_MAXIMUM_PACKET_SIZE.

      The actual size a connected client will use is determined by the minimum of this value and MqttConnAckRestrictions#getMaximumPacketSize().

      Returns:
      the maximum packet size the client sends to the server.
    • getTopicAliasMaximum

      int getTopicAliasMaximum()
      Returns the maximum amount of topic aliases the client accepts from the server. The default is DEFAULT_TOPIC_ALIAS_MAXIMUM.
      Returns:
      the maximum amount of topic aliases the client accepts from the server.
    • getSendTopicAliasMaximum

      int getSendTopicAliasMaximum()
      Returns the maximum amount of topic aliases the client sends to the server. The default is DEFAULT_SEND_TOPIC_ALIAS_MAXIMUM.

      The actual amount a connected client will use is determined by the minimum of this value and MqttConnAckRestrictions#getTopicAliasMaximum().

      Returns:
      the maximum amount of topic aliases the client sends to the server.
    • isRequestProblemInformation

      boolean isRequestProblemInformation()
      Returns whether the client requests problem information from the server. The default is DEFAULT_REQUEST_PROBLEM_INFORMATION.
      Returns:
      whether the client requests problem information from the server.
    • isRequestResponseInformation

      boolean isRequestResponseInformation()
      Returns whether the client requests response information from the server. The default is DEFAULT_REQUEST_RESPONSE_INFORMATION.
      Returns:
      whether the client requests response information from the server.
    • extend

      Creates a builder for extending this Connect restrictions.
      Returns:
      the created builder.