public abstract class AbstractMqttMessageHandler extends AbstractMessageHandler implements ManageableLifecycle
IntegrationManagement.ManagementOverridesEXPRESSION_PARSER, loggerHIGHEST_PRECEDENCE, LOWEST_PRECEDENCEMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Constructor and Description | 
|---|
| AbstractMqttMessageHandler(String url,
                          String clientId) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract void | doStart() | 
| protected abstract void | doStop() | 
| String | getClientId() | 
| int | getClientInstance()Incremented each time the client is connected. | 
| String | getComponentType()Subclasses may implement this method to provide component type information. | 
| protected MessageConverter | getConverter() | 
| protected String | getUrl() | 
| protected void | handleMessageInternal(Message<?> message) | 
| protected void | incrementClientInstance() | 
| boolean | isRunning() | 
| protected void | onInit()Subclasses may implement this for initialization logic. | 
| protected abstract void | publish(String topic,
       Object mqttMessage,
       Message<?> message) | 
| void | setConverter(MessageConverter converter)Set the message converter to use; if this is provided, the adapter qos and retained
 settings are ignored. | 
| void | setDefaultQos(int defaultQos)Set the qos for messages if the  qosExpressionevaluates to null. | 
| void | setDefaultRetained(boolean defaultRetained)Set the retained boolean for messages if the
  retainedExpressionevaluates to null. | 
| void | setDefaultTopic(String defaultTopic)Set the topic to which the message will be published if the
  topicExpressionevaluates to `null`. | 
| void | setQosExpression(Expression qosExpression)Set the qos expression; default "headers['mqtt_qos']". | 
| void | setQosExpressionString(String qosExpression)Set the qos expression; default "headers['mqtt_qos']". | 
| void | setRetainedExpression(Expression retainedExpression)Set the retained expression; default "headers['mqtt_retained']". | 
| void | setRetainedExpressionString(String retainedExpression)Set the retained expression; default "headers['mqtt_retained']". | 
| void | setTopicExpression(Expression topicExpression)Set the topic expression; default "headers['mqtt_topic']". | 
| void | setTopicExpressionString(String topicExpression)Set the topic expression; default "headers['mqtt_topic']". | 
| void | start() | 
| void | stop() | 
handleMessage, onComplete, onError, onNext, onSubscribebuildSendTimer, destroy, getIntegrationPatternType, getManagedName, getManagedType, getMetricsCaptor, getOrder, getOverrides, isLoggingEnabled, registerMetricsCaptor, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackafterPropertiesSet, 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, waitgetThisAsgetBeanName, getComponentNamepublic void setDefaultTopic(String defaultTopic)
topicExpression evaluates to `null`.defaultTopic - the default topic.public void setTopicExpression(Expression topicExpression)
topicExpression - the expression.public void setTopicExpressionString(String topicExpression)
topicExpression - the expression.public void setDefaultQos(int defaultQos)
qosExpression
 evaluates to null. Only applies if a message converter is not provided.defaultQos - the default qos.setConverter(MessageConverter)public void setQosExpression(Expression qosExpression)
qosExpression - the expression.setConverter(MessageConverter)public void setQosExpressionString(String qosExpression)
qosExpression - the expression.setConverter(MessageConverter)public void setDefaultRetained(boolean defaultRetained)
retainedExpression evaluates to null.
 Only applies if a message converter is not provided.defaultRetained - the default defaultRetained.setConverter(MessageConverter)public void setRetainedExpression(Expression retainedExpression)
retainedExpression - the expression.setConverter(MessageConverter)public void setRetainedExpressionString(String retainedExpression)
retainedExpression - the expression.setConverter(MessageConverter)public void setConverter(MessageConverter converter)
converter - the converter.protected MessageConverter getConverter()
public String getClientId()
public int getClientInstance()
public String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class MessageHandlerSupportprotected void incrementClientInstance()
protected void onInit()
IntegrationObjectSupportonInit in class IntegrationObjectSupportpublic final void start()
start in interface Lifecyclestart in interface ManageableLifecycleprotected abstract void doStart()
public final void stop()
stop in interface Lifecyclestop in interface ManageableLifecycleprotected abstract void doStop()
public boolean isRunning()
isRunning in interface LifecycleisRunning in interface ManageableLifecycleprotected void handleMessageInternal(Message<?> message)
handleMessageInternal in class AbstractMessageHandler