Class Mqttv5PahoMessageHandler
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.mqtt.outbound.AbstractMqttMessageHandler<org.eclipse.paho.mqttv5.client.IMqttAsyncClient,org.eclipse.paho.mqttv5.client.MqttConnectionOptions>
org.springframework.integration.mqtt.outbound.Mqttv5PahoMessageHandler
- All Implemented Interfaces:
org.eclipse.paho.mqttv5.client.MqttCallback,org.reactivestreams.Subscriber<Message<?>>,Aware,BeanFactoryAware,BeanNameAware,DisposableBean,InitializingBean,ApplicationContextAware,ApplicationEventPublisherAware,Lifecycle,Ordered,ComponentSourceAware,ExpressionCapable,Orderable,IntegrationPattern,MqttComponent<org.eclipse.paho.mqttv5.client.MqttConnectionOptions>,NamedComponent,IntegrationManagement,ManageableLifecycle,TrackableComponent,MessageHandler,reactor.core.CoreSubscriber<Message<?>>
@Deprecated(since="7.2",
forRemoval=true)
public class Mqttv5PahoMessageHandler
extends AbstractMqttMessageHandler<org.eclipse.paho.mqttv5.client.IMqttAsyncClient,org.eclipse.paho.mqttv5.client.MqttConnectionOptions>
implements org.eclipse.paho.mqttv5.client.MqttCallback, MqttComponent<org.eclipse.paho.mqttv5.client.MqttConnectionOptions>
Deprecated, for removal: This API element is subject to removal in a future version.
The
AbstractMqttMessageHandler implementation for MQTT v5.
Payloads other than byte[] or String use the configured MessageConverter.
- Since:
- 5.5.5
- Author:
- Artem Bilan, Lucas Bowler, Artem Vozhdayenko, Glenn Renfro, Deng Pan, Jaehong Park
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
Fields inherited from class org.springframework.integration.mqtt.outbound.AbstractMqttMessageHandler
DEFAULT_COMPLETION_TIMEOUT, DISCONNECT_COMPLETION_TIMEOUT, lockFields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionMqttv5PahoMessageHandler(String url, String clientId) Deprecated, for removal: This API element is subject to removal in a future version.Mqttv5PahoMessageHandler(org.eclipse.paho.mqttv5.client.MqttConnectionOptions connectionOptions, String clientId) Deprecated, for removal: This API element is subject to removal in a future version.Mqttv5PahoMessageHandler(ClientManager<org.eclipse.paho.mqttv5.client.IMqttAsyncClient, org.eclipse.paho.mqttv5.client.MqttConnectionOptions> clientManager) Deprecated, for removal: This API element is subject to removal in a future version.Use this constructor when you need to use a singleClientManager(for instance, to reuse an MQTT connection). -
Method Summary
Modifier and TypeMethodDescriptionvoidauthPacketArrived(int reasonCode, org.eclipse.paho.mqttv5.common.packet.MqttProperties properties) Deprecated, for removal: This API element is subject to removal in a future version.voidconnectComplete(boolean reconnect, String serverURI) Deprecated, for removal: This API element is subject to removal in a future version.voiddeliveryComplete(org.eclipse.paho.mqttv5.client.IMqttToken token) Deprecated, for removal: This API element is subject to removal in a future version.voiddestroy()Deprecated, for removal: This API element is subject to removal in a future version.voiddisconnected(org.eclipse.paho.mqttv5.client.MqttDisconnectResponse disconnectResponse) Deprecated, for removal: This API element is subject to removal in a future version.protected voiddoStart()Deprecated, for removal: This API element is subject to removal in a future version.protected voiddoStop()Deprecated, for removal: This API element is subject to removal in a future version.org.eclipse.paho.mqttv5.client.MqttConnectionOptionsDeprecated, for removal: This API element is subject to removal in a future version.Return information about the connection.protected voidhandleMessageInternal(Message<?> message) Deprecated, for removal: This API element is subject to removal in a future version.voidmessageArrived(String topic, org.eclipse.paho.mqttv5.common.MqttMessage message) Deprecated, for removal: This API element is subject to removal in a future version.voidmqttErrorOccurred(org.eclipse.paho.mqttv5.common.MqttException exception) Deprecated, for removal: This API element is subject to removal in a future version.protected voidonInit()Deprecated, for removal: This API element is subject to removal in a future version.Subclasses may implement this for initialization logic.protected voidDeprecated, for removal: This API element is subject to removal in a future version.voidsetHeaderMapper(HeaderMapper<org.eclipse.paho.mqttv5.common.packet.MqttProperties> headerMapper) Deprecated, for removal: This API element is subject to removal in a future version.voidsetPersistence(@Nullable org.eclipse.paho.mqttv5.client.MqttClientPersistence persistence) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class org.springframework.integration.mqtt.outbound.AbstractMqttMessageHandler
getApplicationEventPublisher, getClientId, getClientInstance, getClientManager, getCompletionTimeout, getComponentType, getConverter, getDefaultQos, getDefaultRetained, getDefaultTopic, getDisconnectCompletionTimeout, getQosProcessor, getRetainedProcessor, getTopicProcessor, getUrl, incrementClientInstance, isAsync, isRunning, messageSentEvent, sendDeliveryCompleteEvent, sendFailedDeliveryEvent, setApplicationEventPublisher, setAsync, setAsyncEvents, setCompletionTimeout, setConverter, setDefaultQos, setDefaultRetained, setDefaultTopic, setDisconnectCompletionTimeout, setQosExpression, setQosExpressionString, setRetainedExpression, setRetainedExpressionString, setTopicExpression, setTopicExpressionString, start, stopMethods inherited from class org.springframework.integration.handler.AbstractMessageHandler
handleMessage, onComplete, onError, onNext, onSubscribe, setObservationConventionMethods inherited from class org.springframework.integration.handler.MessageHandlerSupport
buildSendTimer, getIntegrationPatternType, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.BeanNameAware
setBeanNameMethods inherited from interface reactor.core.CoreSubscriber
currentContextMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getThisAsMethods inherited from interface org.springframework.integration.mqtt.core.MqttComponent
getBeanNameMethods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName
-
Constructor Details
-
Mqttv5PahoMessageHandler
Deprecated, for removal: This API element is subject to removal in a future version. -
Mqttv5PahoMessageHandler
public Mqttv5PahoMessageHandler(org.eclipse.paho.mqttv5.client.MqttConnectionOptions connectionOptions, String clientId) Deprecated, for removal: This API element is subject to removal in a future version. -
Mqttv5PahoMessageHandler
public Mqttv5PahoMessageHandler(ClientManager<org.eclipse.paho.mqttv5.client.IMqttAsyncClient, org.eclipse.paho.mqttv5.client.MqttConnectionOptions> clientManager) Deprecated, for removal: This API element is subject to removal in a future version.Use this constructor when you need to use a singleClientManager(for instance, to reuse an MQTT connection).- Parameters:
clientManager- The client manager.- Since:
- 6.0
-
-
Method Details
-
getConnectionInfo
public org.eclipse.paho.mqttv5.client.MqttConnectionOptions 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.mqttv5.client.MqttConnectionOptions>- Returns:
- the information.
-
setPersistence
public void setPersistence(@Nullable org.eclipse.paho.mqttv5.client.MqttClientPersistence persistence) Deprecated, for removal: This API element is subject to removal in a future version. -
setHeaderMapper
public void setHeaderMapper(HeaderMapper<org.eclipse.paho.mqttv5.common.packet.MqttProperties> headerMapper) Deprecated, for removal: This API element is subject to removal in a future version. -
onInit
protected void onInit()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:IntegrationObjectSupportSubclasses may implement this for initialization logic.- Overrides:
onInitin classAbstractMqttMessageHandler<org.eclipse.paho.mqttv5.client.IMqttAsyncClient,org.eclipse.paho.mqttv5.client.MqttConnectionOptions>
-
doStart
protected void doStart()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
doStartin classAbstractMqttMessageHandler<org.eclipse.paho.mqttv5.client.IMqttAsyncClient,org.eclipse.paho.mqttv5.client.MqttConnectionOptions>
-
doStop
protected void doStop()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
doStopin classAbstractMqttMessageHandler<org.eclipse.paho.mqttv5.client.IMqttAsyncClient,org.eclipse.paho.mqttv5.client.MqttConnectionOptions>
-
destroy
public void destroy()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
destroyin interfaceDisposableBean- Specified by:
destroyin interfaceIntegrationManagement- Overrides:
destroyin classMessageHandlerSupport
-
handleMessageInternal
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
handleMessageInternalin classAbstractMqttMessageHandler<org.eclipse.paho.mqttv5.client.IMqttAsyncClient,org.eclipse.paho.mqttv5.client.MqttConnectionOptions>
-
publish
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
publishin classAbstractMqttMessageHandler<org.eclipse.paho.mqttv5.client.IMqttAsyncClient,org.eclipse.paho.mqttv5.client.MqttConnectionOptions>
-
deliveryComplete
public void deliveryComplete(org.eclipse.paho.mqttv5.client.IMqttToken token) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
deliveryCompletein interfaceorg.eclipse.paho.mqttv5.client.MqttCallback
-
disconnected
public void disconnected(org.eclipse.paho.mqttv5.client.MqttDisconnectResponse disconnectResponse) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
disconnectedin interfaceorg.eclipse.paho.mqttv5.client.MqttCallback
-
mqttErrorOccurred
public void mqttErrorOccurred(org.eclipse.paho.mqttv5.common.MqttException exception) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
mqttErrorOccurredin interfaceorg.eclipse.paho.mqttv5.client.MqttCallback
-
messageArrived
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
messageArrivedin interfaceorg.eclipse.paho.mqttv5.client.MqttCallback
-
connectComplete
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
connectCompletein interfaceorg.eclipse.paho.mqttv5.client.MqttCallback
-
authPacketArrived
public void authPacketArrived(int reasonCode, org.eclipse.paho.mqttv5.common.packet.MqttProperties properties) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
authPacketArrivedin interfaceorg.eclipse.paho.mqttv5.client.MqttCallback
-
spring-integration-mqtt-clientmodule.