public class MethodInvocationRetryListenerSupport extends Object implements RetryListener
Empty method implementation of RetryListener with focus on the AOP reflective
method invocations providing convenience retry listener type-safe (with a
`MethodInvocationRetryCallback` callback parameter) specific methods.
MethodInvocationRetryCallback.| Constructor and Description |
|---|
MethodInvocationRetryListenerSupport() |
| Modifier and Type | Method and Description |
|---|---|
<T,E extends Throwable> |
close(RetryContext context,
RetryCallback<T,E> callback,
Throwable throwable)
Called after the final attempt (successful or not).
|
protected <T,E extends Throwable> |
doClose(RetryContext context,
MethodInvocationRetryCallback<T,E> callback,
Throwable throwable) |
protected <T,E extends Throwable> |
doOnError(RetryContext context,
MethodInvocationRetryCallback<T,E> callback,
Throwable throwable) |
protected <T,E extends Throwable> |
doOpen(RetryContext context,
MethodInvocationRetryCallback<T,E> callback) |
<T,E extends Throwable> |
onError(RetryContext context,
RetryCallback<T,E> callback,
Throwable throwable)
Called after every unsuccessful attempt at a retry.
|
<T,E extends Throwable> |
open(RetryContext context,
RetryCallback<T,E> callback)
Called before the first attempt in a retry.
|
public MethodInvocationRetryListenerSupport()
public <T,E extends Throwable> void close(RetryContext context, RetryCallback<T,E> callback, Throwable throwable)
RetryListenerclose in interface RetryListenerT - the return valueE - the exception typecontext - the current RetryContext.callback - the current RetryCallback.throwable - the last exception that was thrown by the callback.public <T,E extends Throwable> void onError(RetryContext context, RetryCallback<T,E> callback, Throwable throwable)
RetryListeneronError in interface RetryListenerT - the return valueE - the exception to throwcontext - the current RetryContext.callback - the current RetryCallback.throwable - the last exception that was thrown by the callback.public <T,E extends Throwable> boolean open(RetryContext context, RetryCallback<T,E> callback)
RetryListenerRetryOperations. The whole
retry can be vetoed by returning false from this method, in which case a
TerminatedRetryException will be thrown.open in interface RetryListenerT - the type of object returned by the callbackE - the type of exception it declares may be throwncontext - the current RetryContext.callback - the current RetryCallback.protected <T,E extends Throwable> void doClose(RetryContext context, MethodInvocationRetryCallback<T,E> callback, Throwable throwable)
protected <T,E extends Throwable> void doOnError(RetryContext context, MethodInvocationRetryCallback<T,E> callback, Throwable throwable)
protected <T,E extends Throwable> boolean doOpen(RetryContext context, MethodInvocationRetryCallback<T,E> callback)
Copyright © 2022 SpringSource. All rights reserved.