Interface Mqtt5ConnectRestrictions
Restrictions set by the client in an
MQTT 5 Connect message.
These restrictions consist of:
- Restrictions for the server.
These are used to form the
Mqtt5ClientConnectionConfig.RestrictionsForServer - Restrictions for the client set by the client itself.
These restrictions are used in conjunction with the
Mqtt5ConnAckRestrictionsto form theMqtt5ClientConnectionConfig.RestrictionsForClient.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default maximum packet size the client accepts from the server.static final intThe default maximum amount of not acknowledged publishes with QoS 1 or 2 the client accepts from the server concurrently.static final booleanDefault whether the client accepts problem information from the server.static final booleanDefault whether the client requests problem information from the server.static final intThe default maximum amount of not acknowledged publishes with QoS 1 or 2 the client sends to the server concurrently.static final intThe default maximum packet size the client sends to the server.static final intThe default maximum amount of topic aliases the client sends to the server.static final intThe default maximum amount of topic aliases the client accepts from the server. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder for Connect restrictions.extend()Creates a builder for extending this Connect restrictions.intReturns the maximum packet size the client accepts from the server.intReturns the maximum amount of not acknowledged publishes with QoS 1 or 2 the client accepts from the server concurrently.intReturns the maximum amount of not acknowledged publishes with QoS 1 or 2 the client sends to the server concurrently.intReturns the maximum packet size the client sends to the server.intReturns the maximum amount of topic aliases the client sends to the server.intReturns the maximum amount of topic aliases the client accepts from the server.booleanReturns whether the client requests problem information from the server.booleanReturns whether the client requests response information from the server.
-
Field Details
-
DEFAULT_RECEIVE_MAXIMUM
static final int DEFAULT_RECEIVE_MAXIMUMThe 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_MAXIMUMThe 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_SIZEThe 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_SIZEThe 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_MAXIMUMThe 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_MAXIMUMThe default maximum amount of topic aliases the client sends to the server.- See Also:
-
DEFAULT_REQUEST_PROBLEM_INFORMATION
static final boolean DEFAULT_REQUEST_PROBLEM_INFORMATIONDefault whether the client accepts problem information from the server.- See Also:
-
DEFAULT_REQUEST_RESPONSE_INFORMATION
static final boolean DEFAULT_REQUEST_RESPONSE_INFORMATIONDefault 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 isDEFAULT_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 isDEFAULT_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 isDEFAULT_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 isDEFAULT_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 isDEFAULT_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 isDEFAULT_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 isDEFAULT_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 isDEFAULT_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.
-