类 MqttMessageHandler
- java.lang.Object
-
- cool.doudou.mqtt.assistant.core.handler.MqttMessageHandler
-
public class MqttMessageHandler extends java.lang.ObjectMqttMessageHandler- 从以下版本开始:
- 2022/3/4
- 作者:
- jiangcs
-
-
构造器概要
构造器 构造器 说明 MqttMessageHandler()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.springframework.messaging.MessageHandlererrorHandler()通过通道获取数据org.springframework.messaging.MessageHandlerhandler()通过通道获取数据org.springframework.integration.core.MessageProducermqttInbound(org.springframework.integration.mqtt.core.MqttPahoClientFactory mqttPahoClientFactory, org.springframework.messaging.MessageChannel mqttInboundChannel, org.springframework.messaging.MessageChannel mqttErrorChannel)消息接收org.springframework.messaging.MessageHandlermqttOutbound(org.springframework.integration.mqtt.core.MqttPahoClientFactory mqttPahoClientFactory)通过通道获取数据
-
-
-
方法详细资料
-
mqttInbound
@Bean public org.springframework.integration.core.MessageProducer mqttInbound(org.springframework.integration.mqtt.core.MqttPahoClientFactory mqttPahoClientFactory, org.springframework.messaging.MessageChannel mqttInboundChannel, org.springframework.messaging.MessageChannel mqttErrorChannel)消息接收- 参数:
mqttPahoClientFactory- PahoClient工厂mqttInboundChannel- 消息通道InboundmqttErrorChannel- 消息通道Error- 返回:
- MessageProducer
-
handler
@Bean @ServiceActivator(inputChannel="mqttInboundChannel") public org.springframework.messaging.MessageHandler handler()
通过通道获取数据ServiceActivator: 指定接收消息的管道为 mqttInboundChannel,投递到 mqttInboundChannel 管道中的消息会被该方法接收并执行
- 返回:
- MessageHandler
-
errorHandler
@Bean @ServiceActivator(inputChannel="mqttErrorChannel") public org.springframework.messaging.MessageHandler errorHandler()
通过通道获取数据ServiceActivator: 指定接收消息的管道为 mqttErrorChannel,投递到 mqttErrorChannel 管道中的消息会被该方法接收并执行
- 返回:
- MessageHandler
-
mqttOutbound
@Bean @ServiceActivator(inputChannel="mqttOutboundChannel") public org.springframework.messaging.MessageHandler mqttOutbound(org.springframework.integration.mqtt.core.MqttPahoClientFactory mqttPahoClientFactory)
通过通道获取数据ServiceActivator: 指定接收消息的管道为 mqttOutboundChannel,投递到 mqttOutboundChannel 管道中的消息会被该方法接收并执行
- 参数:
mqttPahoClientFactory- PahoClient工厂- 返回:
- MessageHandler
-
-