public class RetryListenerSupport extends Object implements RetryListener
RetryListener.| Constructor and Description |
|---|
RetryListenerSupport() |
| 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).
|
<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 <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.Copyright © 2022 SpringSource. All rights reserved.