Package software.amazon.awssdk.crt.mqtt5
Class Mqtt5ClientOptions
- java.lang.Object
- 
- software.amazon.awssdk.crt.mqtt5.Mqtt5ClientOptions
 
- 
 public class Mqtt5ClientOptions extends Object Configuration for the creation of Mqtt5Clients
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classMqtt5ClientOptions.ClientOfflineQueueBehaviorControls how disconnects affect the queued and in-progress operations tracked by the client.static classMqtt5ClientOptions.ClientSessionBehaviorControls how the Mqtt5Client should behave with respect to MQTT sessions.static classMqtt5ClientOptions.ExtendedValidationAndFlowControlOptionsAdditional 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 interfaceMqtt5ClientOptions.LifecycleEventsAn interface that defines all of the functions the Mqtt5Client will call when it receives a lifecycle event.static classMqtt5ClientOptions.Mqtt5ClientOptionsBuilderAll of the options for a Mqtt5Client.static interfaceMqtt5ClientOptions.PublishEventsAn interface that defines all of the publish functions the Mqtt5Client will call when it receives a publish packet.
 - 
Constructor SummaryConstructors Constructor Description Mqtt5ClientOptions(Mqtt5ClientOptions.Mqtt5ClientOptionsBuilder builder)Creates a Mqtt5ClientOptionsBuilder instance
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description LonggetAckTimeoutSeconds()Returns the time interval to wait for an ack after sending a QoS 1+ PUBLISH, SUBSCRIBE, or UNSUBSCRIBE before failing the operation.ClientBootstrapgetBootstrap()Returns the Client bootstrap used.LonggetConnackTimeoutMs()Returns the time interval to wait after sending a CONNECT request for a CONNACK to arrive.ConnectPacketgetConnectOptions()Returns all configurable options with respect to the CONNECT packet sent by the client, including the will.Mqtt5ClientOptions.ExtendedValidationAndFlowControlOptionsgetExtendedValidationAndFlowControlOptions()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.StringgetHostName()Returns the host name of the MQTT server to connect to.HttpProxyOptionsgetHttpProxyOptions()Returns the (tunneling) HTTP proxy usage when establishing MQTT connectionsMqtt5ClientOptions.LifecycleEventsgetLifecycleEvents()Returns the LifecycleEvents interface that will be called when the client gets a LifecycleEvent.LonggetMaxReconnectDelayMs()Returns the maximum amount of time to wait to reconnect after a disconnect.LonggetMinConnectedTimeToResetReconnectDelayMs()Returns the amount of time that must elapse with an established connection before the reconnect delay is reset to the minimum.LonggetMinReconnectDelayMs()Returns the minimum amount of time to wait to reconnect after a disconnect.Mqtt5ClientOptions.ClientOfflineQueueBehaviorgetOfflineQueueBehavior()Returns how disconnects affect the queued and in-progress operations tracked by the client.LonggetPingTimeoutMs()Returns the time interval to wait after sending a PINGREQ for a PINGRESP to arrive.LonggetPort()Returns the network port of the MQTT server to connect to.Mqtt5ClientOptions.PublishEventsgetPublishEvents()Returns the PublishEvents interface that will be called when the client gets a message.ExponentialBackoffRetryOptions.JitterModegetRetryJitterMode()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.Mqtt5ClientOptions.ClientSessionBehaviorgetSessionBehavior()Returns how the Mqtt5Client should behave with respect to MQTT sessions.SocketOptionsgetSocketOptions()Returns the socket properties of the underlying MQTT connections made by the client.TlsContextgetTlsContext()Returns the TLS context for secure socket connections.TopicAliasingOptionsgetTopicAliasingOptions()Returns the topic aliasing options to be used by the clientConsumer<Mqtt5WebsocketHandshakeTransformArgs>getWebsocketHandshakeTransform()Returns the callback that allows a custom transformation of the HTTP request which acts as the websocket handshake.
 
- 
- 
- 
Constructor Detail- 
Mqtt5ClientOptionspublic Mqtt5ClientOptions(Mqtt5ClientOptions.Mqtt5ClientOptionsBuilder builder) Creates a Mqtt5ClientOptionsBuilder instance- Parameters:
- builder- The builder to get the Mqtt5ClientOptions values from
 
 
- 
 - 
Method Detail- 
getHostNamepublic String getHostName() Returns the host name of the MQTT server to connect to.- Returns:
- Host name of the MQTT server to connect to.
 
 - 
getPortpublic Long getPort() Returns the network port of the MQTT server to connect to.- Returns:
- Network port of the MQTT server to connect to.
 
 - 
getBootstrappublic ClientBootstrap getBootstrap() Returns the Client bootstrap used.- Returns:
- The Client bootstrap used
 
 - 
getSocketOptionspublic SocketOptions 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.
 
 - 
getTlsContextpublic TlsContext 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.
 
 - 
getHttpProxyOptionspublic HttpProxyOptions getHttpProxyOptions() Returns the (tunneling) HTTP proxy usage when establishing MQTT connections- Returns:
- (tunneling) HTTP proxy usage when establishing MQTT connections
 
 - 
getConnectOptionspublic ConnectPacket 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
 
 - 
getSessionBehaviorpublic Mqtt5ClientOptions.ClientSessionBehavior getSessionBehavior() Returns how the Mqtt5Client should behave with respect to MQTT sessions.- Returns:
- How the Mqtt5Client should behave with respect to MQTT sessions.
 
 - 
getExtendedValidationAndFlowControlOptionspublic 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
 
 - 
getOfflineQueueBehaviorpublic Mqtt5ClientOptions.ClientOfflineQueueBehavior 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.
 
 - 
getRetryJitterModepublic ExponentialBackoffRetryOptions.JitterMode 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.
 
 - 
getMinReconnectDelayMspublic Long 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.
 
 - 
getMaxReconnectDelayMspublic Long 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
 
 - 
getMinConnectedTimeToResetReconnectDelayMspublic Long 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
 
 - 
getPingTimeoutMspublic Long 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.
 
 - 
getConnackTimeoutMspublic Long 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
 
 - 
getAckTimeoutSecondspublic Long 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.
 
 - 
getLifecycleEventspublic Mqtt5ClientOptions.LifecycleEvents 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
 
 - 
getWebsocketHandshakeTransformpublic Consumer<Mqtt5WebsocketHandshakeTransformArgs> 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.
 
 - 
getPublishEventspublic Mqtt5ClientOptions.PublishEvents 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.
 
 - 
getTopicAliasingOptionspublic TopicAliasingOptions getTopicAliasingOptions() Returns the topic aliasing options to be used by the client- Returns:
- the topic aliasing options to be used by the client
 
 
- 
 
-