Package software.amazon.awssdk.crt.mqtt5
Class Mqtt5ClientOptions
java.lang.Object
software.amazon.awssdk.crt.mqtt5.Mqtt5ClientOptions
Configuration for the creation of Mqtt5Clients
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumControls how disconnects affect the queued and in-progress operations tracked by the client.static enumControls how the Mqtt5Client should behave with respect to MQTT sessions.static enumAdditional controls for client behavior with respect to operation validation and flow control; these checks go beyond the MQTT5 spec to respect limits of specific MQTT brokers.static interfaceAn interface that defines all of the functions the Mqtt5Client will call when it receives a lifecycle event.static final classAll of the options for a Mqtt5Client.static interfaceAn interface that defines all of the publish functions the Mqtt5Client will call when it receives a publish packet. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a Mqtt5ClientOptionsBuilder instance -
Method Summary
Modifier and TypeMethodDescriptionReturns the time interval to wait for an ack after sending a QoS 1+ PUBLISH, SUBSCRIBE, or UNSUBSCRIBE before failing the operation.Returns the Client bootstrap used.Returns the time interval to wait after sending a CONNECT request for a CONNACK to arrive.Returns all configurable options with respect to the CONNECT packet sent by the client, including the will.Returns the additional controls for client behavior with respect to operation validation and flow control; these checks go beyond the base MQTT5 spec to respect limits of specific MQTT brokers.Returns the host name of the MQTT server to connect to.Returns the (tunneling) HTTP proxy usage when establishing MQTT connectionsReturns the LifecycleEvents interface that will be called when the client gets a LifecycleEvent.Returns the maximum amount of time to wait to reconnect after a disconnect.Returns the amount of time that must elapse with an established connection before the reconnect delay is reset to the minimum.Returns the minimum amount of time to wait to reconnect after a disconnect.Returns how disconnects affect the queued and in-progress operations tracked by the client.Returns the time interval to wait after sending a PINGREQ for a PINGRESP to arrive.getPort()Returns the network port of the MQTT server to connect to.Returns the PublishEvents interface that will be called when the client gets a message.Returns how the reconnect delay is modified in order to smooth out the distribution of reconnection attempt time points for a large set of reconnecting clients.Returns how the Mqtt5Client should behave with respect to MQTT sessions.Returns the socket properties of the underlying MQTT connections made by the client.Returns the TLS context for secure socket connections.Returns the topic aliasing options to be used by the clientReturns the callback that allows a custom transformation of the HTTP request which acts as the websocket handshake.
-
Constructor Details
-
Mqtt5ClientOptions
Creates a Mqtt5ClientOptionsBuilder instance- Parameters:
builder- The builder to get the Mqtt5ClientOptions values from
-
-
Method Details
-
getHostName
Returns the host name of the MQTT server to connect to.- Returns:
- Host name of the MQTT server to connect to.
-
getPort
Returns the network port of the MQTT server to connect to.- Returns:
- Network port of the MQTT server to connect to.
-
getBootstrap
Returns the Client bootstrap used.- Returns:
- The Client bootstrap used
-
getSocketOptions
Returns the socket properties of the underlying MQTT connections made by the client.- Returns:
- the socket properties of the underlying MQTT connections made by the client or null if defaults are used.
-
getTlsContext
Returns the TLS context for secure socket connections. If null, then a plaintext connection will be used.- Returns:
- TLS context for secure socket connections.
-
getHttpProxyOptions
Returns the (tunneling) HTTP proxy usage when establishing MQTT connections- Returns:
- (tunneling) HTTP proxy usage when establishing MQTT connections
-
getConnectOptions
Returns all configurable options with respect to the CONNECT packet sent by the client, including the will. These connect properties will be used for every connection attempt made by the client.- Returns:
- all configurable options with respect to the CONNECT packet sent by the client, including the will
-
getSessionBehavior
Returns how the Mqtt5Client should behave with respect to MQTT sessions.- Returns:
- How the Mqtt5Client should behave with respect to MQTT sessions.
-
getExtendedValidationAndFlowControlOptions
public Mqtt5ClientOptions.ExtendedValidationAndFlowControlOptions getExtendedValidationAndFlowControlOptions()Returns the additional controls for client behavior with respect to operation validation and flow control; these checks go beyond the base MQTT5 spec to respect limits of specific MQTT brokers.- Returns:
- The additional controls for client behavior with respect to operation validation and flow control
-
getOfflineQueueBehavior
Returns how disconnects affect the queued and in-progress operations tracked by the client. Also controls how new operations are handled while the client is not connected. In particular, if the client is not connected, then any operation that would be failed on disconnect (according to these rules) will also be rejected.- Returns:
- How disconnects affect the queued and in-progress operations tracked by the client.
-
getRetryJitterMode
Returns how the reconnect delay is modified in order to smooth out the distribution of reconnection attempt time points for a large set of reconnecting clients.- Returns:
- how the reconnect delay is modified in order to smooth out the distribution of reconnection attempt time points for a large set of reconnecting clients.
-
getMinReconnectDelayMs
Returns the minimum amount of time to wait to reconnect after a disconnect. Exponential back-off is performed with jitter after each connection failure.- Returns:
- The minimum amount of time to wait to reconnect after a disconnect.
-
getMaxReconnectDelayMs
Returns the maximum amount of time to wait to reconnect after a disconnect. Exponential back-off is performed with jitter after each connection failure.- Returns:
- The maximum amount of time to wait to reconnect after a disconnect
-
getMinConnectedTimeToResetReconnectDelayMs
Returns the amount of time that must elapse with an established connection before the reconnect delay is reset to the minimum. This helps alleviate bandwidth-waste in fast reconnect cycles due to permission failures on operations.- Returns:
- The amount of time that must elapse with an established connection before the reconnect delay is reset to the minimum
-
getPingTimeoutMs
Returns the time interval to wait after sending a PINGREQ for a PINGRESP to arrive. If one does not arrive, the client will close the current connection.- Returns:
- time interval to wait after sending a PINGREQ for a PINGRESP to arrive.
-
getConnackTimeoutMs
Returns the time interval to wait after sending a CONNECT request for a CONNACK to arrive. If one does not arrive, the connection will be shut down.- Returns:
- Time interval to wait after sending a CONNECT request for a CONNACK to arrive
-
getAckTimeoutSeconds
Returns the time interval to wait for an ack after sending a QoS 1+ PUBLISH, SUBSCRIBE, or UNSUBSCRIBE before failing the operation.- Returns:
- the time interval to wait for an ack after sending a QoS 1+ PUBLISH, SUBSCRIBE, or UNSUBSCRIBE before failing the operation.
-
getLifecycleEvents
Returns the LifecycleEvents interface that will be called when the client gets a LifecycleEvent.- Returns:
- The LifecycleEvents interface that will be called when the client gets a LifecycleEvent
-
getWebsocketHandshakeTransform
Returns the callback that allows a custom transformation of the HTTP request which acts as the websocket handshake. Websockets will be used if this is set to a valid transformation callback. To use websockets but not perform a transformation, just set this as a trivial completion callback. If null, the connection will be made with direct MQTT.- Returns:
- The custom transformation of the HTTP request that acts as the websocket handshake or null.
-
getPublishEvents
Returns the PublishEvents interface that will be called when the client gets a message.- Returns:
- PublishEvents interface that will be called when the client gets a message.
-
getTopicAliasingOptions
Returns the topic aliasing options to be used by the client- Returns:
- the topic aliasing options to be used by the client
-