Class Mqttv3ClientManager
java.lang.Object
org.springframework.integration.mqtt.core.AbstractMqttClientManager<org.eclipse.paho.client.mqttv3.IMqttAsyncClient, org.eclipse.paho.client.mqttv3.MqttConnectOptions>
org.springframework.integration.mqtt.core.Mqttv3ClientManager
- All Implemented Interfaces:
org.eclipse.paho.client.mqttv3.MqttCallback, org.eclipse.paho.client.mqttv3.MqttCallbackExtended, Aware, BeanNameAware, ApplicationEventPublisherAware, Lifecycle, Phased, SmartLifecycle, ClientManager<org.eclipse.paho.client.mqttv3.IMqttAsyncClient, org.eclipse.paho.client.mqttv3.MqttConnectOptions>, MqttComponent<org.eclipse.paho.client.mqttv3.MqttConnectOptions>
@Deprecated(since="7.2",
forRemoval=true)
public class Mqttv3ClientManager
extends AbstractMqttClientManager<org.eclipse.paho.client.mqttv3.IMqttAsyncClient, org.eclipse.paho.client.mqttv3.MqttConnectOptions>
implements org.eclipse.paho.client.mqttv3.MqttCallbackExtended
Deprecated, for removal: This API element is subject to removal in a future version.
A client manager implementation for MQTT v3 protocol. Requires a client ID and server URI.
If needed, the connection options may be overridden and passed as a
MqttConnectOptions dependency.
By default, automatic reconnect is used. If it is required to be turned off, one should listen for
MqttConnectionFailedEvent and reconnect the MQTT client manually.- Since:
- 6.0
- Author:
- Artem Vozhdayenko, Artem Bilan, Christian Tzolov, Jiri Soucek, Jaehong Park
-
Nested Class Summary
Nested classes/interfaces inherited from interface ClientManager
ClientManager.ConnectCallback, ClientManager.DefaultMessageHandler<M> -
Field Summary
Fields inherited from class AbstractMqttClientManager
lock, loggerFields inherited from interface ClientManager
DEFAULT_COMPLETION_TIMEOUT, DISCONNECT_COMPLETION_TIMEOUT, QUIESCENT_TIMEOUTFields inherited from interface SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionMqttv3ClientManager(String url, String clientId) Deprecated, for removal: This API element is subject to removal in a future version.Mqttv3ClientManager(org.eclipse.paho.client.mqttv3.MqttConnectOptions connectionOptions, String clientId) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidconnectComplete(boolean reconnect, String serverURI) Deprecated, for removal: This API element is subject to removal in a future version.voidconnectionLost(Throwable cause) Deprecated, for removal: This API element is subject to removal in a future version.voiddeliveryComplete(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken token) Deprecated, for removal: This API element is subject to removal in a future version.org.eclipse.paho.client.mqttv3.MqttConnectOptionsDeprecated, for removal: This API element is subject to removal in a future version.Return information about the connection.booleanDeprecated, for removal: This API element is subject to removal in a future version.Return the managed clients isConnected.voidmessageArrived(String topic, org.eclipse.paho.client.mqttv3.MqttMessage message) Deprecated, for removal: This API element is subject to removal in a future version.voidsetPersistence(org.eclipse.paho.client.mqttv3.MqttClientPersistence persistence) Deprecated, for removal: This API element is subject to removal in a future version.Set theMqttClientPersistencefor a client.voidstart()Deprecated, for removal: This API element is subject to removal in a future version.voidstop()Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class AbstractMqttClientManager
addCallback, addDefaultMessageHandler, getApplicationEventPublisher, getBeanName, getCallbacks, getClient, getClientId, getCompletionTimeout, getDefaultMessageHandlers, getDisconnectCompletionTimeout, getPhase, getQuiescentTimeout, getUrl, isManualAcks, isRunning, removeCallback, removeDefaultMessageHandler, setApplicationEventPublisher, setBeanName, setClient, setCompletionTimeout, setDisconnectCompletionTimeout, setManualAcks, setPhase, setQuiescentTimeout, setUrlMethods 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
-
Mqttv3ClientManager
-
Mqttv3ClientManager
public Mqttv3ClientManager(org.eclipse.paho.client.mqttv3.MqttConnectOptions connectionOptions, String clientId) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
setPersistence
public void setPersistence(org.eclipse.paho.client.mqttv3.MqttClientPersistence persistence) Deprecated, for removal: This API element is subject to removal in a future version.Set theMqttClientPersistencefor a client.- Parameters:
persistence- persistence implementation to use for te client
-
getConnectionInfo
public org.eclipse.paho.client.mqttv3.MqttConnectOptions getConnectionInfo()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MqttComponentReturn information about the connection.- Specified by:
getConnectionInfoin interfaceMqttComponent<org.eclipse.paho.client.mqttv3.MqttConnectOptions>- Returns:
- the information.
-
start
-
stop
-
connectionLost
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
connectionLostin interfaceorg.eclipse.paho.client.mqttv3.MqttCallback
-
connectComplete
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
connectCompletein interfaceorg.eclipse.paho.client.mqttv3.MqttCallbackExtended
-
messageArrived
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
messageArrivedin interfaceorg.eclipse.paho.client.mqttv3.MqttCallback
-
deliveryComplete
public void deliveryComplete(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken token) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
deliveryCompletein interfaceorg.eclipse.paho.client.mqttv3.MqttCallback
-
isConnected
public boolean isConnected()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ClientManagerReturn the managed clients isConnected.- Specified by:
isConnectedin interfaceClientManager<org.eclipse.paho.client.mqttv3.IMqttAsyncClient, org.eclipse.paho.client.mqttv3.MqttConnectOptions>- Returns:
- the managed clients isConnected.
-
spring-integration-mqtt-clientmodule.