@ManagedResource @IntegrationManagedResource public abstract class AbstractMqttMessageDrivenChannelAdapter extends MessageProducerSupport
| Modifier and Type | Field and Description |
|---|---|
protected Lock |
topicLock |
lifecycleCondition, lifecycleLockEXPRESSION_PARSER, loggerDEFAULT_PHASE| Constructor and Description |
|---|
AbstractMqttMessageDrivenChannelAdapter(String url,
String clientId,
String... topic) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTopic(String... topic)
Add a topic (or topics) to the subscribed list (qos=1).
|
void |
addTopic(String topic,
int qos)
Add a topic to the subscribed list.
|
void |
addTopics(String[] topic,
int[] qos)
Add topics to the subscribed list.
|
protected String |
getClientId() |
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected MqttMessageConverter |
getConverter() |
int[] |
getQos() |
String[] |
getTopic() |
protected String |
getUrl() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
removeTopic(String... topic)
Remove a topic (or topics) from the subscribed list.
|
void |
setConverter(MqttMessageConverter converter) |
void |
setQos(int... qos)
Set the QoS for each topic; a single value will apply to all topics otherwise
the correct number of qos values must be provided.
|
afterSingletonsInstantiated, buildErrorMessage, doStart, doStop, getErrorChannel, getErrorMessageAttributes, getMessagingTemplate, getOutputChannel, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrackdestroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBeanName, getComponentNameprotected final Lock topicLock
public void setConverter(MqttMessageConverter converter)
public void setQos(int... qos)
qos - The qos value(s).@ManagedAttribute public int[] getQos()
protected String getUrl()
protected String getClientId()
protected MqttMessageConverter getConverter()
@ManagedAttribute public String[] getTopic()
public String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupport@ManagedOperation public void addTopic(String topic, int qos)
topic - The topic.qos - The qos.MessagingException - if the topic is already in the list.@ManagedOperation public void addTopic(String... topic)
topic - The topics.MessagingException - if the topic is already in the list.@ManagedOperation public void addTopics(String[] topic, int[] qos)
topic - The topics.qos - The qos for each topic.MessagingException - if a topic is already in the list.@ManagedOperation public void removeTopic(String... topic)
topic - The topic.MessagingException - if the topic is not in the list.protected void onInit()
IntegrationObjectSupportonInit in class MessageProducerSupport