Class Mqtt5MessageDrivenChannelAdapter

All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, SmartInitializingSingleton, ApplicationContextAware, ApplicationEventPublisherAware, Lifecycle, Phased, SmartLifecycle, ComponentSourceAware, ExpressionCapable, MessageProducer, IntegrationPattern, ClientManager.ConnectCallback, NamedComponent, IntegrationInboundManagement, IntegrationManagement, ManageableLifecycle, ManageableSmartLifecycle, TrackableComponent

public class Mqtt5MessageDrivenChannelAdapter extends AbstractMqttMessageDrivenChannelAdapter<com.hivemq.client.mqtt.mqtt5.Mqtt5Client>
The AbstractMqttMessageDrivenChannelAdapter implementation for MQTT v5.
Since:
7.2
Author:
Jiandong Ma
  • Constructor Details

    • Mqtt5MessageDrivenChannelAdapter

      public Mqtt5MessageDrivenChannelAdapter(ClientManager<com.hivemq.client.mqtt.mqtt5.Mqtt5Client> mqttClientManager, String... topics)
    • Mqtt5MessageDrivenChannelAdapter

      public Mqtt5MessageDrivenChannelAdapter(ClientManager<com.hivemq.client.mqtt.mqtt5.Mqtt5Client> mqttClientManager, com.hivemq.client.mqtt.mqtt5.message.subscribe.Mqtt5Subscription... subscriptions)
  • Method Details

    • onInit

      protected void onInit()
      Description copied from class: IntegrationObjectSupport
      Subclasses may implement this for initialization logic.
      Overrides:
      onInit in class AbstractMqttMessageDrivenChannelAdapter<com.hivemq.client.mqtt.mqtt5.Mqtt5Client>
    • setHeaderMapper

      public void setHeaderMapper(HeaderMapper<com.hivemq.client.mqtt.mqtt5.message.publish.Mqtt5Publish> headerMapper)
      Set the HeaderMapper to map the Mqtt5Publish optional data
      Parameters:
      headerMapper - the headMapper
    • setNoLocal

      public void setNoLocal(boolean noLocal)
      Set whether the client must not receive messages published by itself.
      Parameters:
      noLocal - whether the subscription is not local.
    • setRetainHandling

      public void setRetainHandling(com.hivemq.client.mqtt.mqtt5.message.subscribe.Mqtt5RetainHandling retainHandling)
      Set the handling of retained message for this Subscription.
      Parameters:
      retainHandling - the retain handling.
    • setRetainAsPublished

      public void setRetainAsPublished(boolean retainAsPublished)
      Set whether the retain flag for incoming Publish messages must be set to its original value.
      Parameters:
      retainAsPublished - the retainAsPublished.
    • doStart

      protected void doStart()
      Description copied from class: MessageProducerSupport
      Take no action by default. Subclasses may override this if they need lifecycle-managed behavior. Protected by 'lifecycleLock'.
      Overrides:
      doStart in class MessageProducerSupport
    • doStop

      protected void doStop()
      Description copied from class: MessageProducerSupport
      Take no action by default. Subclasses may override this if they need lifecycle-managed behavior.
      Overrides:
      doStop in class MessageProducerSupport
    • onClientConnected

      public void onClientConnected(com.hivemq.client.mqtt.lifecycle.MqttClientConnectedContext context)
      Description copied from interface: ClientManager.ConnectCallback
      Called when the client to the server is connected successfully.
      Parameters:
      context - the mqttClientConnectedContext.