public abstract class AbstractRequestHandlerAdvice extends IntegrationObjectSupport implements MethodInterceptor
MessageHandler advice classes. Subclasses should provide
an implementation for doInvoke(ExecutionCallback, Object, Message).
Used to advise the handleRequestMessage method for AbstractReplyProducingMessageHandler or
MessageHandler.handleMessage(Message) for other message handlers.| Modifier and Type | Class and Description |
|---|---|
protected static interface |
AbstractRequestHandlerAdvice.ExecutionCallback
Called by subclasses in doInvoke() to proceed() the invocation.
|
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
EXPRESSION_PARSER| Constructor and Description |
|---|
AbstractRequestHandlerAdvice() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Object |
doInvoke(AbstractRequestHandlerAdvice.ExecutionCallback callback,
Object target,
Message<?> message)
Subclasses implement this method to apply behavior to the
MessageHandler. |
Object |
invoke(MethodInvocation invocation) |
protected Exception |
unwrapExceptionIfNecessary(Exception e)
Unwrap the cause of a
AbstractRequestHandlerAdvice.ThrowableHolderException. |
protected Throwable |
unwrapThrowableIfNecessary(Exception e)
Unwrap the cause of a
AbstractRequestHandlerAdvice.ThrowableHolderException. |
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, onInit, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringpublic final Object invoke(MethodInvocation invocation) throws Throwable
invoke in interface MethodInterceptorThrowableprotected abstract Object doInvoke(AbstractRequestHandlerAdvice.ExecutionCallback callback, Object target, Message<?> message) throws Exception
MessageHandler.
callback.execute() invokes the handler method and returns its result, or null.
callback - Subclasses invoke the execute() method on this interface to invoke the handler method.target - The target handler.message - The message that will be sent to the handler.MessageHandler.Exception - Any Exception.protected Exception unwrapExceptionIfNecessary(Exception e)
AbstractRequestHandlerAdvice.ThrowableHolderException.e - The exception.AbstractRequestHandlerAdvice.ThrowableHolderException