Class MessageHandlerSupport
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- ApplicationContextAware,- Ordered,- ExpressionCapable,- Orderable,- IntegrationPattern,- NamedComponent,- IntegrationManagement,- TrackableComponent
- Direct Known Subclasses:
- AbstractMessageHandler,- AbstractReactiveMessageHandler
@IntegrationManagedResource
public abstract class MessageHandlerSupport
extends IntegrationObjectSupport
implements TrackableComponent, Orderable, IntegrationManagement, IntegrationPattern
Base class for Message handling components that provides basic validation and error
 handling capabilities. Asserts that the incoming Message is not null and that it does
 not contain a null payload. Converts checked exceptions into runtime
 
MessagingExceptions.- Since:
- 5.3
- Author:
- Mark Fisher, Oleg Zhurakousky, Gary Russell, Artem Bilan, Amit Sadafule, David Turanski
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagementIntegrationManagement.ManagementOverrides
- 
Field SummaryFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagementMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected TimerFacadebuildSendTimer(boolean success, String exception) voiddestroy()Subclasses may implement this method to provide component type information.Return a pattern type this component implements.protected MetricsCaptorprotected io.micrometer.observation.ObservationRegistryintgetOrder()Return the overrides.booleanReturn whether logging is enabled.booleanTrue if this implementation is going to deal with a registry other than theObservationRegistry.NOOPinstance.voidregisterMetricsCaptor(MetricsCaptor metricsCaptorToRegister) Inject aMetricsCaptor.voidregisterObservationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry) Inject anObservationRegistry.protected TimerFacadevoidsetLoggingEnabled(boolean loggingEnabled) Enable logging or not.voidsetManagedName(String managedName) voidsetManagedType(String managedType) voidsetOrder(int order) Set the order for this component.voidsetShouldTrack(boolean shouldTrack) protected booleanMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, onInit, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagementgetThisAsMethods inherited from interface org.springframework.integration.support.context.NamedComponentgetBeanName, getComponentName
- 
Constructor Details- 
MessageHandlerSupportpublic MessageHandlerSupport()
 
- 
- 
Method Details- 
isLoggingEnabledpublic boolean isLoggingEnabled()Description copied from interface:IntegrationManagementReturn whether logging is enabled.- Specified by:
- isLoggingEnabledin interface- IntegrationManagement
- Returns:
- true if enabled.
 
- 
setLoggingEnabledpublic void setLoggingEnabled(boolean loggingEnabled) Description copied from interface:IntegrationManagementEnable logging or not.- Specified by:
- setLoggingEnabledin interface- IntegrationManagement
- Parameters:
- loggingEnabled- false to disable.
 
- 
registerMetricsCaptorDescription copied from interface:IntegrationManagementInject aMetricsCaptor. Ignored ifObservationRegistryis provided.- Specified by:
- registerMetricsCaptorin interface- IntegrationManagement
- Parameters:
- metricsCaptorToRegister- the captor.
- See Also:
 
- 
getMetricsCaptor
- 
registerObservationRegistrypublic void registerObservationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry) Description copied from interface:IntegrationManagementInject anObservationRegistry. If provided, theMetricsCaptoris ignored. The meters capturing has to be configured as anObservationHandleron the providedObservationRegistry.- Specified by:
- registerObservationRegistryin interface- IntegrationManagement
- Parameters:
- observationRegistry- the- ObservationRegistryto expose observations from the component.
- See Also:
 
- 
isObservedpublic boolean isObserved()Description copied from interface:IntegrationManagementTrue if this implementation is going to deal with a registry other than theObservationRegistry.NOOPinstance.- Specified by:
- isObservedin interface- IntegrationManagement
- Returns:
- true if this implementation is going to deal with a registry other than the ObservationRegistry.NOOPinstance.
 
- 
getObservationRegistryprotected io.micrometer.observation.ObservationRegistry getObservationRegistry()
- 
setOrderpublic void setOrder(int order) Description copied from interface:OrderableSet the order for this component.
- 
getOrderpublic int getOrder()
- 
getComponentTypeDescription copied from class:IntegrationObjectSupportSubclasses may implement this method to provide component type information.- Specified by:
- getComponentTypein interface- NamedComponent
- Overrides:
- getComponentTypein class- IntegrationObjectSupport
 
- 
setShouldTrackpublic void setShouldTrack(boolean shouldTrack) - Specified by:
- setShouldTrackin interface- TrackableComponent
 
- 
shouldTrackprotected boolean shouldTrack()
- 
getOverridesDescription copied from interface:IntegrationManagementReturn the overrides.- Specified by:
- getOverridesin interface- IntegrationManagement
- Returns:
- the overrides.
 
- 
getIntegrationPatternTypeDescription copied from interface:IntegrationPatternReturn a pattern type this component implements.- Specified by:
- getIntegrationPatternTypein interface- IntegrationPattern
- Returns:
- the IntegrationPatternTypethis component implements.
 
- 
sendTimer
- 
buildSendTimer
- 
setManagedName- Specified by:
- setManagedNamein interface- IntegrationManagement
 
- 
getManagedName- Specified by:
- getManagedNamein interface- IntegrationManagement
 
- 
setManagedType- Specified by:
- setManagedTypein interface- IntegrationManagement
 
- 
getManagedType- Specified by:
- getManagedTypein interface- IntegrationManagement
 
- 
destroypublic void destroy()- Specified by:
- destroyin interface- DisposableBean
- Specified by:
- destroyin interface- IntegrationManagement
 
 
-