Class DefaultPahoMessageConverter

java.lang.Object
org.springframework.integration.mqtt.support.DefaultPahoMessageConverter
All Implemented Interfaces:
Aware, BeanFactoryAware, MqttMessageConverter, MessageConverter

public class DefaultPahoMessageConverter
extends Object
implements MqttMessageConverter, BeanFactoryAware
Default implementation for mapping to/from Messages.
Since:
4.0
Author:
Gary Russell, Artem Bilan
  • Constructor Details

    • DefaultPahoMessageConverter

      public DefaultPahoMessageConverter()
      Construct a converter with default options (qos=0, retain=false, charset=UTF-8).
    • DefaultPahoMessageConverter

      public DefaultPahoMessageConverter​(int defaultQos, boolean defaultRetained)
      Construct a converter to create outbound messages with the supplied default qos and retain settings and a UTF-8 charset for converting outbound String payloads to byte[] and inbound byte[] to String (unless payloadAdBytes is true).
      Parameters:
      defaultQos - the default qos.
      defaultRetained - the default retained.
    • DefaultPahoMessageConverter

      public DefaultPahoMessageConverter​(String charset)
      Construct a converter with default options (qos=0, retain=false) and the supplied charset.
      Parameters:
      charset - the charset used to convert outbound String payloads to byte[] and inbound byte[] to String (unless payloadAdBytes is true).
      Since:
      4.1.2
    • DefaultPahoMessageConverter

      public DefaultPahoMessageConverter​(int defaultQos, boolean defaultRetained, String charset)
      Construct a converter to create outbound messages with the supplied default qos and retain settings and the supplied charset.
      Parameters:
      defaultQos - the default qos.
      defaultRetained - the default retained.
      charset - the charset used to convert outbound String payloads to byte[] and inbound byte[] to String (unless payloadAdBytes is true).
    • DefaultPahoMessageConverter

      public DefaultPahoMessageConverter​(int defaultQos, MessageProcessor<Integer> qosProcessor, boolean defaultRetained, MessageProcessor<Boolean> retainedProcessor)
      Construct a converter to create outbound messages with the supplied default qos and retained message processors and a UTF-8 charset for converting outbound String payloads to byte[] and inbound byte[] to String (unless payloadAdBytes is true).
      Parameters:
      defaultQos - the default qos.
      qosProcessor - a message processor to determine the qos.
      defaultRetained - the default retained.
      retainedProcessor - a message processor to determine the retained flag.
      Since:
      5.0
    • DefaultPahoMessageConverter

      public DefaultPahoMessageConverter​(int defaultQos, MessageProcessor<Integer> qosProcessor, boolean defaultRetained, MessageProcessor<Boolean> retainedProcessor, String charset)
      Construct a converter to create outbound messages with the supplied default qos and retain settings and the supplied charset.
      Parameters:
      defaultQos - the default qos.
      qosProcessor - a message processor to determine the qos.
      defaultRetained - the default retained.
      retainedProcessor - a message processor to determine the retained flag.
      charset - the charset used to convert outbound String payloads to byte[] and inbound byte[] to String (unless payloadAdBytes is true).
      Since:
      5.0
  • Method Details