Package software.amazon.awssdk.crt.mqtt5
Class NegotiatedSettings
- java.lang.Object
-
- software.amazon.awssdk.crt.mqtt5.NegotiatedSettings
-
public class NegotiatedSettings extends Object
MQTT behavior settings that are dynamically negotiated as part of the CONNECT/CONNACK exchange. While you can infer all of these values from a combination of (1) defaults as specified in the MQTT5 spec (2) your CONNECT settings (3) the CONNACK from the broker the client instead does the combining for you and emits a NegotiatedSettings object with final, authoritative values. Negotiated settings are communicated with every successful connection establishment.
-
-
Constructor Summary
Constructors Constructor Description NegotiatedSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAssignedClientID()
Returns the final client id in use by the newly-established connection.long
getMaximumPacketSizeToServer()
QOS
getMaximumQOS()
int
getReceiveMaximumFromServer()
boolean
getRejoinedSession()
boolean
getRetainAvailable()
int
getServerKeepAlive()
Returns the maximum amount of time in seconds between client packets.long
getSessionExpiryInterval()
boolean
getSharedSubscriptionsAvailable()
boolean
getSubscriptionIdentifiersAvailable()
boolean
getWildcardSubscriptionsAvailable()
-
-
-
Method Detail
-
getMaximumQOS
public QOS getMaximumQOS()
- Returns:
- Returns the maximum QoS allowed for publishes on this connection instance
-
getSessionExpiryInterval
public long getSessionExpiryInterval()
- Returns:
- Returns the amount of time in seconds the server will retain the MQTT session after a disconnect.
-
getReceiveMaximumFromServer
public int getReceiveMaximumFromServer()
- Returns:
- Returns the number of in-flight QoS 1 and QoS 2 publications the server is willing to process concurrently.
-
getMaximumPacketSizeToServer
public long getMaximumPacketSizeToServer()
- Returns:
- Returns the maximum packet size the server is willing to accept.
-
getServerKeepAlive
public int getServerKeepAlive()
Returns the maximum amount of time in seconds between client packets. The client should use PINGREQs to ensure this limit is not breached. The server will disconnect the client for inactivity if no MQTT packet is received in a time interval equal to 1.5 x this value.- Returns:
- The maximum amount of time in seconds between client packets.
-
getRetainAvailable
public boolean getRetainAvailable()
- Returns:
- Returns whether the server supports retained messages.
-
getWildcardSubscriptionsAvailable
public boolean getWildcardSubscriptionsAvailable()
- Returns:
- Returns whether the server supports wildcard subscriptions.
-
getSubscriptionIdentifiersAvailable
public boolean getSubscriptionIdentifiersAvailable()
- Returns:
- Returns whether the server supports subscription identifiers
-
getSharedSubscriptionsAvailable
public boolean getSharedSubscriptionsAvailable()
- Returns:
- Returns whether the server supports shared subscriptions
-
getRejoinedSession
public boolean getRejoinedSession()
- Returns:
- Returns whether the client has rejoined an existing session.
-
getAssignedClientID
public String getAssignedClientID()
Returns the final client id in use by the newly-established connection. This will be the configured client id if one was given in the configuration, otherwise, if no client id was specified, this will be the client id assigned by the server. Reconnection attempts will always use the auto-assigned client id, allowing for auto-assigned session resumption.- Returns:
- The final client id in use by the newly-established connection
-
-