org.springframework.batch.retry.interceptor
Interface MethodInvocationRecoverer<T>

All Known Implementing Classes:
JmsMethodInvocationRecoverer

public interface MethodInvocationRecoverer<T>

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

Author:
Dave Syer

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

Method Detail

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


Copyright © 2009 SpringSource. All Rights Reserved.