org.springframework.integration.handler.advice
Class AbstractRequestHandlerAdvice
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.advice.AbstractRequestHandlerAdvice
- All Implemented Interfaces:
- org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, NamedComponent
- Direct Known Subclasses:
- ExpressionEvaluatingRequestHandlerAdvice, RequestHandlerCircuitBreakerAdvice, RequestHandlerRetryAdvice
public abstract class AbstractRequestHandlerAdvice
- extends IntegrationObjectSupport
- implements org.aopalliance.intercept.MethodInterceptor
Base class for 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.
- Since:
- 2.2
|
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
| Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
AbstractRequestHandlerAdvice
public AbstractRequestHandlerAdvice()
invoke
public final java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
throws java.lang.Throwable
- Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
- Throws:
java.lang.Throwable
doInvoke
protected abstract java.lang.Object doInvoke(AbstractRequestHandlerAdvice.ExecutionCallback callback,
java.lang.Object target,
Message<?> message)
throws java.lang.Exception
- Subclasses implement this method to apply behavior to the
MessageHandler. callback.execute()
invokes the handler method and returns its result, or null.
- Parameters:
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.
- Returns:
- the result after invoking the
MessageHandler.
- Throws:
java.lang.Exception