Class MethodInvocationRetryCallback<T,E extends Throwable>

java.lang.Object
org.springframework.retry.interceptor.MethodInvocationRetryCallback<T,E>
Type Parameters:
T - the type of object returned by the callback
E - the type of exception it declares may be thrown
All Implemented Interfaces:
RetryCallback<T,E>

public abstract class MethodInvocationRetryCallback<T,E extends Throwable> extends Object implements RetryCallback<T,E>
Callback class for a Spring AOP reflective `MethodInvocation` that can be retried using a RetryOperations.

In a concrete RetryListener implementation, the `MethodInvocation` can be analysed for providing insights on the method called as well as its parameter values which could then be used for monitoring purposes.

Since:
1.3
Author:
Marius Grama, Artem Bilan
See Also:
  • Field Details

    • invocation

      protected final org.aopalliance.intercept.MethodInvocation invocation
    • label

      protected final String label
  • Constructor Details

    • MethodInvocationRetryCallback

      public MethodInvocationRetryCallback(org.aopalliance.intercept.MethodInvocation invocation, @Nullable String label)
      Constructor for the class.
      Parameters:
      invocation - the method invocation
      label - a unique label for statistics reporting.
  • Method Details

    • getInvocation

      public org.aopalliance.intercept.MethodInvocation getInvocation()
    • getLabel

      public String getLabel()
      Description copied from interface: RetryCallback
      A logical identifier for this callback to distinguish retries around business operations.
      Specified by:
      getLabel in interface RetryCallback<T,E extends Throwable>
      Returns:
      the identifier for this callback.