@IntegrationManagedResource public abstract class AbstractMessageHandler extends IntegrationObjectSupport implements org.springframework.messaging.MessageHandler, MessageHandlerMetrics, ConfigurableMetricsAware<AbstractMessageHandlerMetrics>, TrackableComponent, Orderable
MessagingException
s.EXPRESSION_PARSER, logger
Constructor and Description |
---|
AbstractMessageHandler() |
Modifier and Type | Method and Description |
---|---|
void |
configureMetrics(AbstractMessageHandlerMetrics metrics) |
int |
getActiveCount() |
long |
getActiveCountLong() |
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
Statistics |
getDuration() |
int |
getErrorCount() |
long |
getErrorCountLong() |
int |
getHandleCount() |
long |
getHandleCountLong() |
String |
getManagedName() |
String |
getManagedType() |
double |
getMaxDuration() |
double |
getMeanDuration() |
double |
getMinDuration() |
int |
getOrder() |
double |
getStandardDeviationDuration() |
void |
handleMessage(org.springframework.messaging.Message<?> message) |
protected abstract void |
handleMessageInternal(org.springframework.messaging.Message<?> message) |
boolean |
isCountsEnabled() |
boolean |
isLoggingEnabled() |
boolean |
isStatsEnabled() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
reset() |
void |
setCountsEnabled(boolean countsEnabled) |
void |
setLoggingEnabled(boolean loggingEnabled) |
void |
setManagedName(String managedName) |
void |
setManagedType(String managedType) |
void |
setOrder(int order)
Set the order for this component.
|
void |
setShouldTrack(boolean shouldTrack) |
void |
setStatsEnabled(boolean statsEnabled) |
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 boolean isLoggingEnabled()
isLoggingEnabled
in interface IntegrationManagement
public void setLoggingEnabled(boolean loggingEnabled)
setLoggingEnabled
in interface IntegrationManagement
public void setOrder(int order)
Orderable
public int getOrder()
getOrder
in interface org.springframework.core.Ordered
public String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class IntegrationObjectSupport
public void setShouldTrack(boolean shouldTrack)
setShouldTrack
in interface TrackableComponent
public void configureMetrics(AbstractMessageHandlerMetrics metrics)
configureMetrics
in interface ConfigurableMetricsAware<AbstractMessageHandlerMetrics>
protected void onInit() throws Exception
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
Exception
- Any exception.public void handleMessage(org.springframework.messaging.Message<?> message)
handleMessage
in interface org.springframework.messaging.MessageHandler
protected abstract void handleMessageInternal(org.springframework.messaging.Message<?> message) throws Exception
Exception
public void reset()
reset
in interface IntegrationManagement
public long getHandleCountLong()
getHandleCountLong
in interface MessageHandlerMetrics
public int getHandleCount()
getHandleCount
in interface MessageHandlerMetrics
public int getErrorCount()
getErrorCount
in interface MessageHandlerMetrics
public long getErrorCountLong()
getErrorCountLong
in interface MessageHandlerMetrics
public double getMeanDuration()
getMeanDuration
in interface MessageHandlerMetrics
public double getMinDuration()
getMinDuration
in interface MessageHandlerMetrics
public double getMaxDuration()
getMaxDuration
in interface MessageHandlerMetrics
public double getStandardDeviationDuration()
getStandardDeviationDuration
in interface MessageHandlerMetrics
public int getActiveCount()
getActiveCount
in interface MessageHandlerMetrics
public long getActiveCountLong()
getActiveCountLong
in interface MessageHandlerMetrics
public Statistics getDuration()
getDuration
in interface MessageHandlerMetrics
public void setStatsEnabled(boolean statsEnabled)
setStatsEnabled
in interface IntegrationStatsManagement
public boolean isStatsEnabled()
isStatsEnabled
in interface IntegrationStatsManagement
public void setCountsEnabled(boolean countsEnabled)
setCountsEnabled
in interface IntegrationManagement
public boolean isCountsEnabled()
isCountsEnabled
in interface IntegrationManagement
public void setManagedName(String managedName)
setManagedName
in interface MessageHandlerMetrics
public String getManagedName()
getManagedName
in interface MessageHandlerMetrics
public void setManagedType(String managedType)
setManagedType
in interface MessageHandlerMetrics
public String getManagedType()
getManagedType
in interface MessageHandlerMetrics