org.springframework.integration.handler.advice
Class RequestHandlerRetryAdvice
java.lang.Object
org.springframework.integration.handler.advice.AbstractRequestHandlerAdvice
org.springframework.integration.handler.advice.RequestHandlerRetryAdvice
- All Implemented Interfaces:
- org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor
public class RequestHandlerRetryAdvice
- extends AbstractRequestHandlerAdvice
Uses spring-retry to perform stateless or stateful retry.
Stateless retry means the retries are performed internally
by the RetryTemplate
; stateful retry means the
exception is thrown but state is maintained to support
the retry policies. Stateful retry requires a
RetryStateGenerator
.
- Since:
- 2.2
- Author:
- Gary Russell
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RequestHandlerRetryAdvice
public RequestHandlerRetryAdvice()
setRetryTemplate
public void setRetryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate)
setRecoveryCallback
public void setRecoveryCallback(org.springframework.retry.RecoveryCallback<java.lang.Object> recoveryCallback)
setRetryStateGenerator
public void setRetryStateGenerator(RetryStateGenerator retryStateGenerator)
doInvoke
protected java.lang.Object doInvoke(AbstractRequestHandlerAdvice.ExecutionCallback callback,
java.lang.Object target,
Message<?> message)
throws java.lang.Exception
- Specified by:
doInvoke
in class AbstractRequestHandlerAdvice
- Throws:
java.lang.Exception