Class RetryListenerSupport
java.lang.Object
org.springframework.retry.listener.RetryListenerSupport
- All Implemented Interfaces:
RetryListener
@Deprecated(since="2.0.1",
forRemoval=true)
public class RetryListenerSupport
extends Object
implements RetryListener
Deprecated, for removal: This API element is subject to removal in a future version.
Empty method implementation of
RetryListener
.- Author:
- Dave Syer, Henning Pƶttker
-
Constructor Summary
ConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescription<T,
E extends Throwable>
voidclose
(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) Deprecated, for removal: This API element is subject to removal in a future version.Called after the final attempt (successful or not).<T,
E extends Throwable>
voidonError
(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) Deprecated, for removal: This API element is subject to removal in a future version.Called after every unsuccessful attempt at a retry.<T,
E extends Throwable>
booleanopen
(RetryContext context, RetryCallback<T, E> callback) Deprecated, for removal: This API element is subject to removal in a future version.Called before the first attempt in a retry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.retry.RetryListener
onSuccess
-
Constructor Details
-
RetryListenerSupport
public RetryListenerSupport()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
close
public <T,E extends Throwable> void close(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:RetryListener
Called after the final attempt (successful or not). Allow the listener to clean up any resource it is holding before control returns to the retry caller.- Specified by:
close
in interfaceRetryListener
- Type Parameters:
T
- the return valueE
- the exception type- Parameters:
context
- the currentRetryContext
.callback
- the currentRetryCallback
.throwable
- the last exception that was thrown by the callback.
-
onError
public <T,E extends Throwable> void onError(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:RetryListener
Called after every unsuccessful attempt at a retry.- Specified by:
onError
in interfaceRetryListener
- Type Parameters:
T
- the return valueE
- the exception to throw- Parameters:
context
- the currentRetryContext
.callback
- the currentRetryCallback
.throwable
- the last exception that was thrown by the callback.
-
open
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:RetryListener
Called before the first attempt in a retry. For instance, implementers can set up state that is needed by the policies in theRetryOperations
. The whole retry can be vetoed by returning false from this method, in which case aTerminatedRetryException
will be thrown.- Specified by:
open
in interfaceRetryListener
- Type Parameters:
T
- the type of object returned by the callbackE
- the type of exception it declares may be thrown- Parameters:
context
- the currentRetryContext
.callback
- the currentRetryCallback
.- Returns:
- true if the retry should proceed.
-
RetryListener