Class Mqtt3ClientManager
java.lang.Object
org.springframework.integration.mqtt.client.core.AbstractMqttClientManager<com.hivemq.client.mqtt.mqtt3.Mqtt3Client, com.hivemq.client.mqtt.mqtt3.Mqtt3ClientConfig>
org.springframework.integration.mqtt.client.core.Mqtt3ClientManager
- All Implemented Interfaces:
com.hivemq.client.mqtt.lifecycle.MqttClientConnectedListener, Aware, InitializingBean, ApplicationEventPublisherAware, Lifecycle, Phased, SmartLifecycle, ClientManager<com.hivemq.client.mqtt.mqtt3.Mqtt3Client>
public class Mqtt3ClientManager
extends AbstractMqttClientManager<com.hivemq.client.mqtt.mqtt3.Mqtt3Client, com.hivemq.client.mqtt.mqtt3.Mqtt3ClientConfig>
A client manager implementation for MQTT v3 protocol.
- Since:
- 7.2
- Author:
- Jiandong Ma
-
Nested Class Summary
Nested classes/interfaces inherited from interface ClientManager
ClientManager.ConnectCallback -
Field Summary
Fields inherited from class AbstractMqttClientManager
connectCallbacks, lock, logger, mqttClientConfigFields inherited from interface SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionMqtt3ClientManager(com.hivemq.client.mqtt.mqtt3.Mqtt3ClientConfig mqtt3ClientConfig) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.hivemq.client.mqtt.mqtt3.Mqtt3ClientBuild the mqttClient using the suppliedMqttClientConfig.voidonConnected(com.hivemq.client.mqtt.lifecycle.MqttClientConnectedContext context) voidsetMqttConnect(com.hivemq.client.mqtt.mqtt3.message.connect.Mqtt3Connect mqttConnect) Set the Connect message.voidstart()voidstop()Methods inherited from class AbstractMqttClientManager
addCallback, afterPropertiesSet, createBaseClientBuilder, getApplicationEventPublisher, getClient, getPhase, isConnected, isRunning, removeCallback, setApplicationEventPublisher, setPhaseMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SmartLifecycle
isAutoStartup, isPauseable, pause, restart, stop
-
Constructor Details
-
Mqtt3ClientManager
public Mqtt3ClientManager(com.hivemq.client.mqtt.mqtt3.Mqtt3ClientConfig mqtt3ClientConfig)
-
-
Method Details
-
buildClient
protected com.hivemq.client.mqtt.mqtt3.Mqtt3Client buildClient()Description copied from class:AbstractMqttClientManagerBuild the mqttClient using the suppliedMqttClientConfig.- Specified by:
buildClientin classAbstractMqttClientManager<com.hivemq.client.mqtt.mqtt3.Mqtt3Client, com.hivemq.client.mqtt.mqtt3.Mqtt3ClientConfig>- Returns:
- the mqttClient
-
setMqttConnect
public void setMqttConnect(com.hivemq.client.mqtt.mqtt3.message.connect.Mqtt3Connect mqttConnect) Set the Connect message.- Parameters:
mqttConnect- the mqttConnect
-
start
public void start() -
stop
public void stop() -
onConnected
public void onConnected(com.hivemq.client.mqtt.lifecycle.MqttClientConnectedContext context)
-