public abstract class AbstractMqttMessageHandler extends AbstractMessageHandler implements SmartLifecycle
logger
HIGHEST_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, setShouldTrack
afterPropertiesSet, 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 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()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class AbstractMessageHandler
protected void onInit() throws Exception
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
Exception
- 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 SmartLifecycle
public void stop(Runnable callback)
stop
in interface SmartLifecycle
protected void handleMessageInternal(Message<?> message) throws Exception
handleMessageInternal
in class AbstractMessageHandler
Exception
protected abstract void connectIfNeeded()