Class AbstractMqttMessageDrivenChannelAdapter<T,C>
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.mqtt.inbound.AbstractMqttMessageDrivenChannelAdapter<T,C>
- Type Parameters:
T- MQTT Client typeC- MQTT connection options type (v5 or v3)
- All Implemented Interfaces:
Aware,BeanFactoryAware,BeanNameAware,DisposableBean,InitializingBean,SmartInitializingSingleton,ApplicationContextAware,ApplicationEventPublisherAware,Lifecycle,Phased,SmartLifecycle,ComponentSourceAware,ExpressionCapable,MessageProducer,IntegrationPattern,ClientManager.ConnectCallback,NamedComponent,IntegrationInboundManagement,IntegrationManagement,ManageableLifecycle,ManageableSmartLifecycle,TrackableComponent
- Direct Known Subclasses:
MqttPahoMessageDrivenChannelAdapter,Mqttv5PahoMessageDrivenChannelAdapter
@Deprecated(since="7.2",
forRemoval=true)
@ManagedResource
@IntegrationManagedResource
public abstract class AbstractMqttMessageDrivenChannelAdapter<T,C>
extends MessageProducerSupport
implements ApplicationEventPublisherAware, ClientManager.ConnectCallback
Deprecated, for removal: This API element is subject to removal in a future version.
Abstract class for MQTT Message-Driven Channel Adapters.
- Since:
- 4.0
- Author:
- Gary Russell, Artem Bilan, Trung Pham, Mikhail Polivakha, Artem Vozhdayenko, Jiri Soucek, Glenn Renfro, Jaehong Park
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final LockDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class org.springframework.integration.endpoint.AbstractEndpoint
lifecycleLockFields 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.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionAbstractMqttMessageDrivenChannelAdapter(@Nullable String url, String clientId, String... topic) Deprecated, for removal: This API element is subject to removal in a future version.AbstractMqttMessageDrivenChannelAdapter(ClientManager<T, C> clientManager, String... topic) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.Add a topic (or topics) to the subscribed list (qos=1).voidDeprecated, for removal: This API element is subject to removal in a future version.Add a topic to the subscribed list.voidDeprecated, for removal: This API element is subject to removal in a future version.Add topics to the subscribed list.voiddestroy()Deprecated, for removal: This API element is subject to removal in a future version.protected ApplicationEventPublisherDeprecated, for removal: This API element is subject to removal in a future version.protected StringDeprecated, for removal: This API element is subject to removal in a future version.protected @Nullable ClientManager<T,C> Deprecated, for removal: This API element is subject to removal in a future version.protected longDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.protected @Nullable MqttMessageConverterDeprecated, for removal: This API element is subject to removal in a future version.protected longDeprecated, for removal: This API element is subject to removal in a future version.int[]getQos()Deprecated, for removal: This API element is subject to removal in a future version.protected longDeprecated, for removal: This API element is subject to removal in a future version.String[]getTopic()Deprecated, for removal: This API element is subject to removal in a future version.protected @Nullable StringgetUrl()Deprecated, for removal: This API element is subject to removal in a future version.protected booleanDeprecated, 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.voidremoveTopic(String... topic) Deprecated, for removal: This API element is subject to removal in a future version.Remove a topic (or topics) from the subscribed list.voidsetApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) Deprecated, for removal: This API element is subject to removal in a future version.voidsetCompletionTimeout(long completionTimeout) Deprecated, for removal: This API element is subject to removal in a future version.Set the completion timeout for operations.voidsetConverter(MqttMessageConverter converter) Deprecated, for removal: This API element is subject to removal in a future version.voidsetDisconnectCompletionTimeout(long completionTimeout) Deprecated, for removal: This API element is subject to removal in a future version.Set the completion timeout when disconnecting.voidsetManualAcks(boolean manualAcks) Deprecated, for removal: This API element is subject to removal in a future version.Set the acknowledgment mode to manual.voidsetQos(int... qos) Deprecated, for removal: This API element is subject to removal in a future version.Set the QoS for each topic; a single value will apply to all topics otherwise the correct number of qos values must be provided.voidsetQuiescentTimeout(long quiescentTimeout) Deprecated, for removal: This API element is subject to removal in a future version.Set the quiescentTimeout timeout when disconnecting.Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
afterSingletonsInstantiated, buildErrorMessage, doStart, doStop, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, getOutputChannelName, getRequiredOutputChannel, isObserved, registerObservationRegistry, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setObservationConvention, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisherMethods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopMethods 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.integration.mqtt.core.ClientManager.ConnectCallback
connectCompleteMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentNameMethods inherited from interface org.springframework.context.SmartLifecycle
isPauseable
-
Field Details
-
topicLock
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
AbstractMqttMessageDrivenChannelAdapter
public AbstractMqttMessageDrivenChannelAdapter(@Nullable String url, String clientId, String... topic) Deprecated, for removal: This API element is subject to removal in a future version. -
AbstractMqttMessageDrivenChannelAdapter
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
setConverter
Deprecated, for removal: This API element is subject to removal in a future version. -
getClientManager
Deprecated, for removal: This API element is subject to removal in a future version. -
setQos
public void setQos(int... qos) Deprecated, for removal: This API element is subject to removal in a future version.Set the QoS for each topic; a single value will apply to all topics otherwise the correct number of qos values must be provided.- Parameters:
qos- The qos value(s).- Since:
- 4.1
-
getQos
Deprecated, for removal: This API element is subject to removal in a future version. -
getUrl
Deprecated, for removal: This API element is subject to removal in a future version. -
getClientId
Deprecated, for removal: This API element is subject to removal in a future version. -
getConverter
Deprecated, for removal: This API element is subject to removal in a future version. -
getTopic
Deprecated, for removal: This API element is subject to removal in a future version. -
setDisconnectCompletionTimeout
public void setDisconnectCompletionTimeout(long completionTimeout) Deprecated, for removal: This API element is subject to removal in a future version.Set the completion timeout when disconnecting. Default 5000L milliseconds.- Parameters:
completionTimeout- The timeout.- Since:
- 5.1.10
-
getDisconnectCompletionTimeout
protected long getDisconnectCompletionTimeout()Deprecated, for removal: This API element is subject to removal in a future version. -
setQuiescentTimeout
public void setQuiescentTimeout(long quiescentTimeout) Deprecated, for removal: This API element is subject to removal in a future version.Set the quiescentTimeout timeout when disconnecting. Default isClientManager.QUIESCENT_TIMEOUTmilliseconds.- Parameters:
quiescentTimeout- The timeout.- Since:
- 7.0.0
-
getQuiescentTimeout
protected long getQuiescentTimeout()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 classMessageProducerSupport
-
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 classAbstractEndpoint
-
getComponentType
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getComponentTypein interfaceNamedComponent- Overrides:
getComponentTypein classMessageProducerSupport
-
setApplicationEventPublisher
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setApplicationEventPublisherin interfaceApplicationEventPublisherAware
-
getApplicationEventPublisher
Deprecated, for removal: This API element is subject to removal in a future version. -
setManualAcks
public void setManualAcks(boolean manualAcks) Deprecated, for removal: This API element is subject to removal in a future version.Set the acknowledgment mode to manual.- Parameters:
manualAcks- true for manual acks.- Since:
- 5.3
-
isManualAcks
protected boolean isManualAcks()Deprecated, for removal: This API element is subject to removal in a future version. -
setCompletionTimeout
public void setCompletionTimeout(long completionTimeout) Deprecated, for removal: This API element is subject to removal in a future version.Set the completion timeout for operations. Default 30000L milliseconds.- Parameters:
completionTimeout- The timeout.- Since:
- 4.1
-
getCompletionTimeout
protected long getCompletionTimeout()Deprecated, for removal: This API element is subject to removal in a future version. -
addTopic
Deprecated, for removal: This API element is subject to removal in a future version.Add a topic to the subscribed list.- Parameters:
topic- The topic.qos- The qos.- Throws:
MessagingException- if the topic is already in the list.- Since:
- 4.1
-
addTopic
Deprecated, for removal: This API element is subject to removal in a future version.Add a topic (or topics) to the subscribed list (qos=1).- Parameters:
topics- The topics.- Throws:
MessagingException- if the topics is already in the list.- Since:
- 4.1
-
addTopics
Deprecated, for removal: This API element is subject to removal in a future version.Add topics to the subscribed list.- Parameters:
topics- The topics.qos- The qos for each topic.- Throws:
MessagingException- if a topics is already in the list.- Since:
- 4.1
-
removeTopic
Deprecated, for removal: This API element is subject to removal in a future version.Remove a topic (or topics) from the subscribed list.- Parameters:
topic- The topic.- Throws:
MessagingException- if the topic is not in the list.- Since:
- 4.1
-
spring-integration-mqtt-clientmodule.