Class MqttV5MessageBinder

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.cloud.stream.binder.Binder<org.springframework.messaging.MessageChannel,​org.springframework.cloud.stream.binder.ConsumerProperties,​org.springframework.cloud.stream.binder.ProducerProperties>, org.springframework.cloud.stream.binder.PollableConsumerBinder<org.springframework.messaging.MessageHandler,​org.springframework.cloud.stream.binder.ConsumerProperties>, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationEventPublisherAware

    public class MqttV5MessageBinder
    extends org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ConsumerProperties,​org.springframework.cloud.stream.binder.ProducerProperties,​MqttV5MessageBinderProvisioner>
    A MQTT v5 message binder turning messages to be sent into MQTT messages.
    Author:
    Holger Eichelberger, SSE
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder

        org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.ErrorInfrastructure, org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.PolledConsumerResources
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private MqttClient client  
      • Fields inherited from class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder

        provisioningProvider
      • Fields inherited from class org.springframework.cloud.stream.binder.AbstractBinder

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.springframework.integration.core.MessageProducer createConsumerEndpoint​(org.springframework.cloud.stream.provisioning.ConsumerDestination destination, java.lang.String group, org.springframework.cloud.stream.binder.ConsumerProperties properties)  
      protected org.springframework.messaging.MessageHandler createProducerMessageHandler​(org.springframework.cloud.stream.provisioning.ProducerDestination destination, org.springframework.cloud.stream.binder.ProducerProperties producerProperties, org.springframework.messaging.MessageChannel errorChannel)  
      • Methods inherited from class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder

        afterUnbindConsumer, afterUnbindProducer, bindPollableConsumer, createPolledConsumerResources, createProducerMessageHandler, doBindConsumer, doBindProducer, errorsBaseName, errorsBaseName, getApplicationEventPublisher, getContainerCustomizer, getDefaultErrorMessageHandler, getErrorBridgeName, getErrorBridgeName, getErrorMessageHandler, getErrorMessageHandlerName, getErrorMessageStrategy, getErrorRecovererName, getMessageSourceCustomizer, getPolledConsumerErrorMessageHandler, getPolledConsumerRecoveryCallback, postProcessOutputChannel, postProcessPollableSource, registerErrorInfrastructure, registerErrorInfrastructure, setApplicationEventPublisher, setConsumerEndpointCustomizer, setProducerMessageHandlerCustomizer, useNativeEncoding
      • Methods inherited from class org.springframework.cloud.stream.binder.AbstractBinder

        afterPropertiesSet, applyPrefix, bindConsumer, bindProducer, buildRetryTemplate, constructDLQName, getApplicationContext, getBeanFactory, getEvaluationContext, groupedName, onInit, setApplicationContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MqttV5MessageBinder

        public MqttV5MessageBinder​(java.lang.String[] headersToEmbed,
                                   MqttV5MessageBinderProvisioner provisioningProvider,
                                   MqttClient client)
        Creates a message binder instance.
        Parameters:
        headersToEmbed - the headers to embed
        provisioningProvider - the provisioning provider including the destination information
        client - thie client instance
    • Method Detail

      • createProducerMessageHandler

        protected org.springframework.messaging.MessageHandler createProducerMessageHandler​(org.springframework.cloud.stream.provisioning.ProducerDestination destination,
                                                                                            org.springframework.cloud.stream.binder.ProducerProperties producerProperties,
                                                                                            org.springframework.messaging.MessageChannel errorChannel)
                                                                                     throws java.lang.Exception
        Specified by:
        createProducerMessageHandler in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ConsumerProperties,​org.springframework.cloud.stream.binder.ProducerProperties,​MqttV5MessageBinderProvisioner>
        Throws:
        java.lang.Exception
      • createConsumerEndpoint

        protected org.springframework.integration.core.MessageProducer createConsumerEndpoint​(org.springframework.cloud.stream.provisioning.ConsumerDestination destination,
                                                                                              java.lang.String group,
                                                                                              org.springframework.cloud.stream.binder.ConsumerProperties properties)
                                                                                       throws java.lang.Exception
        Specified by:
        createConsumerEndpoint in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ConsumerProperties,​org.springframework.cloud.stream.binder.ProducerProperties,​MqttV5MessageBinderProvisioner>
        Throws:
        java.lang.Exception