org.springframework.batch.item
Interface ItemRecoverer

All Known Implementing Classes:
JmsItemReader

public interface ItemRecoverer

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

Author:
Dave Syer

Method Summary
 boolean recover(Object data, Throwable cause)
          Recover gracefully from an error.
 

Method Detail

recover

boolean recover(Object data,
                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:
data - the item that failed.
cause - the cause of the failure that led to this recovery.
Returns:
true if recovery was successful.


Copyright © 2008 SpringSource. All Rights Reserved.