public class DefaultItemFailureHandler extends ItemListenerSupport<java.lang.Object,java.lang.Object>
ItemListenerSupport
class that
writes all exceptions via commons logging. Since generics can't be used to
ensure the list contains exceptions, any non exceptions will be logged out by
calling toString on the object.Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
logger |
Constructor and Description |
---|
DefaultItemFailureHandler() |
Modifier and Type | Method and Description |
---|---|
void |
onReadError(java.lang.Exception ex)
Called if an error occurs while trying to read.
|
void |
onWriteError(java.lang.Exception ex,
java.util.List<? extends java.lang.Object> item)
Called if an error occurs while trying to write.
|
afterProcess, afterRead, afterWrite, beforeProcess, beforeRead, beforeWrite, onProcessError
public void onReadError(java.lang.Exception ex)
ItemReadListener
onReadError
in interface ItemReadListener<java.lang.Object>
onReadError
in class ItemListenerSupport<java.lang.Object,java.lang.Object>
ex
- thrown from ItemWriter
public void onWriteError(java.lang.Exception ex, java.util.List<? extends java.lang.Object> item)
ItemWriteListener
onWriteError
in interface ItemWriteListener<java.lang.Object>
onWriteError
in class ItemListenerSupport<java.lang.Object,java.lang.Object>
ex
- thrown from ItemWriter
item
- attempted to be written.