public interface RetryListener
RetryOperations
can chose to issue callbacks to an
interceptor during the retry lifecycle.Modifier and Type | Method and Description |
---|---|
<T> void |
close(RetryContext context,
RetryCallback<T> callback,
Throwable throwable)
Called after the final attempt (successful or not).
|
<T> void |
onError(RetryContext context,
RetryCallback<T> callback,
Throwable throwable)
Called after every unsuccessful attempt at a retry.
|
<T> boolean |
open(RetryContext context,
RetryCallback<T> callback)
Called before the first attempt in a retry.
|
<T> boolean open(RetryContext context, RetryCallback<T> callback)
RetryOperations
. The whole retry can be vetoed by returning
false from this method, in which case a TerminatedRetryException
will be thrown.context
- the current RetryContext
.callback
- the current RetryCallback
.<T> void close(RetryContext context, RetryCallback<T> callback, Throwable throwable)
context
- the current RetryContext
.callback
- the current RetryCallback
.throwable
- the last exception that was thrown by the callback.<T> void onError(RetryContext context, RetryCallback<T> callback, Throwable throwable)
context
- the current RetryContext
.callback
- the current RetryCallback
.throwable
- the last exception that was thrown by the callback.Copyright © 2013 SpringSource. All rights reserved.