Interface MethodInvocationRecoverer<T>

public interface MethodInvocationRecoverer<T>

Strategy interface for recovery action when processing of an item fails.

Dave Syer

Method Summary
 T recover(java.lang.Object[] args, java.lang.Throwable cause)
          Recover gracefully from an error.

Method Detail


T recover(java.lang.Object[] args,
          java.lang.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.

args - the arguments for the method invocation that failed.
cause - the cause of the failure that led to this recovery.
the value to be returned to the caller

Copyright © 2011 SpringSource. All Rights Reserved.