public class RetryOperationsInterceptor
extends java.lang.Object
implements org.aopalliance.intercept.MethodInterceptor
MethodInterceptor that can be used to automatically retry calls to a method
on a service if it fails. The injected RetryOperations is used to control the
number of retries. By default it will retry a fixed number of times, according to the
defaults in RetryTemplate.| Modifier and Type | Class and Description |
|---|---|
private static class |
RetryOperationsInterceptor.ItemRecovererCallback |
| Modifier and Type | Field and Description |
|---|---|
private MethodInvocationRecoverer<?> |
recoverer |
private RetryOperations |
retryOperations |
| Constructor and Description |
|---|
RetryOperationsInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation) |
void |
setRecoverer(MethodInvocationRecoverer<?> recoverer) |
void |
setRetryOperations(RetryOperations retryTemplate) |
private RetryOperations retryOperations
private MethodInvocationRecoverer<?> recoverer
public void setRetryOperations(RetryOperations retryTemplate)
public void setRecoverer(MethodInvocationRecoverer<?> recoverer)
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
throws java.lang.Throwable
invoke in interface org.aopalliance.intercept.MethodInterceptorjava.lang.Throwable