public abstract class AbstractMessageHandler extends IntegrationObjectSupport implements MessageHandler, TrackableComponent, Orderable
MessagingExceptions.logger| Constructor and Description |
|---|
AbstractMessageHandler() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
int |
getOrder() |
void |
handleMessage(Message<?> message)
Handles the message if possible.
|
protected abstract void |
handleMessageInternal(Message<?> message) |
void |
setOrder(int order)
Set the order for this component.
|
void |
setShouldTrack(boolean shouldTrack) |
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, onInit, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNamepublic 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 final void handleMessage(Message<?> message)
MessageHandlerMessageRejectedException e.g.
in case of a Selective Consumer. When a consumer tries to handle a
message, but fails to do so, a MessageHandlingException is
thrown. In the last case it is recommended to treat the message as tainted
and go into an error scenario.
When the handling results in a failure of another message being sent
(e.g. a "reply" message), that failure will trigger a
MessageDeliveryException.
handleMessage in interface MessageHandlermessage - the message to be handledprotected abstract void handleMessageInternal(Message<?> message) throws java.lang.Exception
java.lang.Exception