Interface MethodInvocationRecoverer<T>

Type Parameters:
T - the return type
All Known Implementing Classes:
RecoverAnnotationRecoveryHandler

public interface MethodInvocationRecoverer<T>
Strategy interface for recovery action when processing of an item fails.
Author:
Dave Syer
  • Method Summary

    Modifier and Type
    Method
    Description
    recover(Object[] args, Throwable cause)
    Recover gracefully from an error.
  • Method Details

    • recover

      T recover(Object[] args, Throwable cause)
      Recover gracefully from an error. Clients can call this if processing of the item throws an unexpected exception. Caller can use the return value to decide whether to try more corrective action or perhaps throw an exception.
      Parameters:
      args - the arguments for the method invocation that failed.
      cause - the cause of the failure that led to this recovery.
      Returns:
      the value to be returned to the caller