public abstract class AbstractMqttMessageHandler extends AbstractMessageHandler implements Lifecycle
EXPRESSION_PARSER, logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
AbstractMqttMessageHandler(String url,
String clientId) |
Modifier and Type | Method and Description |
---|---|
protected void |
connectIfNeeded()
Deprecated.
subclasses should check the connection in
publish(String, Object, Message) . |
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) |
void |
setDefaultQos(int defaultQos) |
void |
setDefaultRetained(boolean defaultRetain) |
void |
setDefaultTopic(String defaultTopic) |
void |
start() |
void |
stop() |
configureMetrics, getActiveCount, getActiveCountLong, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMinDuration, getOrder, getStandardDeviationDuration, handleMessage, isCountsEnabled, isLoggingEnabled, isStatsEnabled, reset, setCountsEnabled, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, setStatsEnabled
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, 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(MessageConverter converter)
protected MessageConverter getConverter()
protected String getUrl()
public String getClientId()
public int getClientInstance()
public String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class AbstractMessageHandler
protected void incrementClientInstance()
protected void onInit() throws Exception
IntegrationObjectSupport
onInit
in class AbstractMessageHandler
Exception
- Any exception.protected abstract void doStart()
protected abstract void doStop()
protected void handleMessageInternal(Message<?> message) throws Exception
handleMessageInternal
in class AbstractMessageHandler
Exception
@Deprecated protected void connectIfNeeded()
publish(String, Object, Message)
.publish(String, Object, Message)
.