Class 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 Detail

      • Mqtt5ListenerOptionsBuilder

        public Mqtt5ListenerOptionsBuilder()
    • 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