@IntegrationManagedResource public abstract class AbstractMessageHandler extends IntegrationObjectSupport implements org.springframework.messaging.MessageHandler, MessageHandlerMetrics, ConfigurableMetricsAware<AbstractMessageHandlerMetrics>, TrackableComponent, Orderable, reactor.core.CoreSubscriber<org.springframework.messaging.Message<?>>
MessagingExceptions.IntegrationManagement.ManagementOverridesEXPRESSION_PARSER, loggerMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Constructor and Description |
|---|
AbstractMessageHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
configureMetrics(AbstractMessageHandlerMetrics metrics) |
int |
getActiveCount() |
long |
getActiveCountLong() |
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
Statistics |
getDuration() |
int |
getErrorCount() |
long |
getErrorCountLong() |
int |
getHandleCount() |
long |
getHandleCountLong() |
java.lang.String |
getManagedName() |
java.lang.String |
getManagedType() |
double |
getMaxDuration() |
double |
getMeanDuration() |
double |
getMinDuration() |
int |
getOrder() |
IntegrationManagement.ManagementOverrides |
getOverrides()
Return the overrides.
|
double |
getStandardDeviationDuration() |
void |
handleMessage(org.springframework.messaging.Message<?> message) |
protected abstract void |
handleMessageInternal(org.springframework.messaging.Message<?> message) |
boolean |
isCountsEnabled() |
boolean |
isLoggingEnabled() |
boolean |
isStatsEnabled() |
void |
onComplete() |
void |
onError(java.lang.Throwable throwable) |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
onNext(org.springframework.messaging.Message<?> message) |
void |
onSubscribe(org.reactivestreams.Subscription subscription) |
void |
registerMetricsCaptor(MetricsCaptor metricsCaptor)
Inject a
MetricsCaptor |
void |
reset() |
void |
setCountsEnabled(boolean countsEnabled) |
void |
setLoggingEnabled(boolean loggingEnabled) |
void |
setManagedName(java.lang.String managedName) |
void |
setManagedType(java.lang.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, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNamepublic boolean isLoggingEnabled()
isLoggingEnabled in interface IntegrationManagementpublic void setLoggingEnabled(boolean loggingEnabled)
setLoggingEnabled in interface IntegrationManagementpublic void registerMetricsCaptor(MetricsCaptor metricsCaptor)
IntegrationManagementMetricsCaptorregisterMetricsCaptor in interface IntegrationManagementmetricsCaptor - the captor.public void setOrder(int order)
Orderablepublic int getOrder()
getOrder in interface org.springframework.core.Orderedpublic java.lang.String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupportpublic void setShouldTrack(boolean shouldTrack)
setShouldTrack in interface TrackableComponentpublic void configureMetrics(AbstractMessageHandlerMetrics metrics)
configureMetrics in interface ConfigurableMetricsAware<AbstractMessageHandlerMetrics>public IntegrationManagement.ManagementOverrides getOverrides()
IntegrationManagementgetOverrides in interface IntegrationManagementprotected void onInit()
throws java.lang.Exception
IntegrationObjectSupportonInit in class IntegrationObjectSupportjava.lang.Exception - Any exception.public void handleMessage(org.springframework.messaging.Message<?> message)
handleMessage in interface org.springframework.messaging.MessageHandlerpublic void onSubscribe(org.reactivestreams.Subscription subscription)
onSubscribe in interface org.reactivestreams.Subscriber<org.springframework.messaging.Message<?>>onSubscribe in interface reactor.core.CoreSubscriber<org.springframework.messaging.Message<?>>public void onNext(org.springframework.messaging.Message<?> message)
onNext in interface org.reactivestreams.Subscriber<org.springframework.messaging.Message<?>>public void onError(java.lang.Throwable throwable)
onError in interface org.reactivestreams.Subscriber<org.springframework.messaging.Message<?>>public void onComplete()
onComplete in interface org.reactivestreams.Subscriber<org.springframework.messaging.Message<?>>protected abstract void handleMessageInternal(org.springframework.messaging.Message<?> message)
throws java.lang.Exception
java.lang.Exceptionpublic void reset()
reset in interface IntegrationManagementpublic long getHandleCountLong()
getHandleCountLong in interface MessageHandlerMetricspublic int getHandleCount()
getHandleCount in interface MessageHandlerMetricspublic int getErrorCount()
getErrorCount in interface MessageHandlerMetricspublic long getErrorCountLong()
getErrorCountLong in interface MessageHandlerMetricspublic double getMeanDuration()
getMeanDuration in interface MessageHandlerMetricspublic double getMinDuration()
getMinDuration in interface MessageHandlerMetricspublic double getMaxDuration()
getMaxDuration in interface MessageHandlerMetricspublic double getStandardDeviationDuration()
getStandardDeviationDuration in interface MessageHandlerMetricspublic int getActiveCount()
getActiveCount in interface MessageHandlerMetricspublic long getActiveCountLong()
getActiveCountLong in interface MessageHandlerMetricspublic Statistics getDuration()
getDuration in interface MessageHandlerMetricspublic void setStatsEnabled(boolean statsEnabled)
setStatsEnabled in interface IntegrationStatsManagementpublic boolean isStatsEnabled()
isStatsEnabled in interface IntegrationStatsManagementpublic void setCountsEnabled(boolean countsEnabled)
setCountsEnabled in interface IntegrationManagementpublic boolean isCountsEnabled()
isCountsEnabled in interface IntegrationManagementpublic void setManagedName(java.lang.String managedName)
setManagedName in interface MessageHandlerMetricspublic java.lang.String getManagedName()
getManagedName in interface MessageHandlerMetricspublic void setManagedType(java.lang.String managedType)
setManagedType in interface MessageHandlerMetricspublic java.lang.String getManagedType()
getManagedType in interface MessageHandlerMetrics