public abstract class AbstractMqttMessageHandler extends AbstractMessageHandler implements SmartLifecycle
loggerHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
AbstractMqttMessageHandler(String url,
String clientId) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
connectIfNeeded() |
protected abstract void |
doStart() |
protected abstract void |
doStop() |
protected String |
getClientId() |
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
int |
getPhase() |
protected String |
getUrl() |
protected void |
handleMessageInternal(Message<?> message) |
boolean |
isAutoStartup() |
boolean |
isRunning() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
protected abstract void |
publish(String topic,
Object mqttMessage) |
void |
setAutoStartup(boolean autoStartup) |
void |
setConverter(MqttMessageConverter converter) |
void |
setDefaultQos(int defaultQos) |
void |
setDefaultRetained(boolean defaultRetain) |
void |
setDefaultTopic(String defaultTopic) |
void |
setPhase(int phase) |
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
getOrder, handleMessage, setOrder, setShouldTrackafterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNamepublic void setDefaultTopic(String defaultTopic)
public void setDefaultQos(int defaultQos)
public void setDefaultRetained(boolean defaultRetain)
public void setConverter(MqttMessageConverter converter)
protected String getUrl()
protected String getClientId()
public String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class AbstractMessageHandlerprotected void onInit()
throws Exception
IntegrationObjectSupportonInit in class IntegrationObjectSupportException - Any exception.protected abstract void doStart()
protected abstract void doStop()
public void setPhase(int phase)
public void setAutoStartup(boolean autoStartup)
public boolean isAutoStartup()
isAutoStartup in interface SmartLifecyclepublic void stop(Runnable callback)
stop in interface SmartLifecycleprotected void handleMessageInternal(Message<?> message) throws Exception
handleMessageInternal in class AbstractMessageHandlerExceptionprotected abstract void connectIfNeeded()