@Singleton public class DefaultRetryInterceptor extends java.lang.Object implements MethodInterceptor<java.lang.Object,java.lang.Object>
MethodInterceptor
that retries an operation according to the specified
Retryable
annotation.HOTSWAP, LAZY, PROXY_TARGET
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
DefaultRetryInterceptor(ApplicationEventPublisher eventPublisher,
java.util.concurrent.ExecutorService executorService)
Construct a default retry method interceptor with the event publisher.
|
Modifier and Type | Method and Description |
---|---|
int |
getOrder() |
java.lang.Object |
intercept(MethodInvocationContext<java.lang.Object,java.lang.Object> context)
Extended version of the
MethodInterceptor.intercept(InvocationContext) method that accepts a MethodInvocationContext . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
intercept
@Inject public DefaultRetryInterceptor(ApplicationEventPublisher eventPublisher, @Named(value="scheduled") java.util.concurrent.ExecutorService executorService)
eventPublisher
- The event publisher to publish retry eventsexecutorService
- The executor service to use for completable futurespublic int getOrder()
public java.lang.Object intercept(MethodInvocationContext<java.lang.Object,java.lang.Object> context)
MethodInterceptor
MethodInterceptor.intercept(InvocationContext)
method that accepts a MethodInvocationContext
.intercept
in interface MethodInterceptor<java.lang.Object,java.lang.Object>
context
- The context