public abstract class AbstractMqttMessageHandler extends AbstractMessageHandler implements Lifecycle
logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
AbstractMqttMessageHandler(java.lang.String url,
java.lang.String clientId) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
connectIfNeeded() |
protected abstract void |
doStart() |
protected abstract void |
doStop() |
java.lang.String |
getClientId() |
int |
getClientInstance()
Incremented each time the client is connected.
|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected MessageConverter |
getConverter() |
protected java.lang.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(java.lang.String topic,
java.lang.Object mqttMessage,
Message<?> message) |
void |
setConverter(MessageConverter converter) |
void |
setDefaultQos(int defaultQos) |
void |
setDefaultRetained(boolean defaultRetain) |
void |
setDefaultTopic(java.lang.String defaultTopic) |
void |
start() |
void |
stop() |
getOrder, handleMessage, setOrder, setShouldTrack
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName
public AbstractMqttMessageHandler(java.lang.String url, java.lang.String clientId)
public void setDefaultTopic(java.lang.String defaultTopic)
public void setDefaultQos(int defaultQos)
public void setDefaultRetained(boolean defaultRetain)
public void setConverter(MessageConverter converter)
protected MessageConverter getConverter()
protected java.lang.String getUrl()
public java.lang.String getClientId()
public int getClientInstance()
public java.lang.String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class AbstractMessageHandler
protected void incrementClientInstance()
protected void onInit() throws java.lang.Exception
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
java.lang.Exception
- Any exception.protected abstract void doStart()
protected abstract void doStop()
protected void handleMessageInternal(Message<?> message) throws java.lang.Exception
handleMessageInternal
in class AbstractMessageHandler
java.lang.Exception
protected abstract void connectIfNeeded()
protected abstract void publish(java.lang.String topic, java.lang.Object mqttMessage, Message<?> message) throws java.lang.Exception
java.lang.Exception