Package software.amazon.awssdk.crt.mqtt5
Class Mqtt5ListenerOptions.Mqtt5ListenerOptionsBuilder
- java.lang.Object
-
- software.amazon.awssdk.crt.mqtt5.Mqtt5ListenerOptions.Mqtt5ListenerOptionsBuilder
-
- Enclosing class:
- Mqtt5ListenerOptions
public static final class Mqtt5ListenerOptions.Mqtt5ListenerOptionsBuilder extends Object
All of the options for a Mqtt5Listener. This includes the settings to make a connection, as well as the event callbacks, publish callbacks, and more.
-
-
Constructor Summary
Constructors Constructor Description Mqtt5ListenerOptionsBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mqtt5ListenerOptionsbuild()Returns a Mqtt5ListenerOptions class configured with all of the options set in the Mqtt5ListenerOptions.Mqtt5ListenerOptions.Mqtt5ListenerOptionsBuilderwithLifecycleEvents(Mqtt5ClientOptions.LifecycleEvents lifecycleEvents)Sets the Lifecycle Events interface that will be called when the client gets a LifecycleEvent.Mqtt5ListenerOptions.Mqtt5ListenerOptionsBuilderwithListenerPublishEvents(Mqtt5ListenerOptions.ListenerPublishEvents publishEvents)Sets the ListenerPublishEvents interface that will be called when the client gets a message.
-
-
-
Method Detail
-
withLifecycleEvents
public Mqtt5ListenerOptions.Mqtt5ListenerOptionsBuilder withLifecycleEvents(Mqtt5ClientOptions.LifecycleEvents lifecycleEvents)
Sets the Lifecycle Events interface that will be called when the client gets a LifecycleEvent.- Parameters:
lifecycleEvents- The LifecycleEvents interface that will be called- Returns:
- The Mqtt5ListenerOptionsBuilder after setting the Lifecycle Events interface
-
withListenerPublishEvents
public Mqtt5ListenerOptions.Mqtt5ListenerOptionsBuilder withListenerPublishEvents(Mqtt5ListenerOptions.ListenerPublishEvents publishEvents)
Sets the ListenerPublishEvents interface that will be called when the client gets a message.- Parameters:
publishEvents- The ListenerPublishEvents interface that will be called when the client gets a message.- Returns:
- The Mqtt5ListenerOptionsBuilder after setting the PublishEvents interface
-
build
public Mqtt5ListenerOptions build()
Returns a Mqtt5ListenerOptions class configured with all of the options set in the Mqtt5ListenerOptions. This can then be used to make a new Mqtt5Client.- Returns:
- A configured Mqtt5ListenerOptions
-
-