public class DefaultItemFailureHandler extends ItemListenerSupport<Object,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(Exception ex)
Called if an error occurs while trying to read.
|
void |
onWriteError(Exception ex,
List<? extends Object> item)
Called if an error occurs while trying to write.
|
afterProcess, afterRead, afterWrite, beforeProcess, beforeRead, beforeWrite, onProcessError
public void onReadError(Exception ex)
ItemReadListener
onReadError
in interface ItemReadListener<Object>
onReadError
in class ItemListenerSupport<Object,Object>
ex
- thrown from ItemWriter
public void onWriteError(Exception ex, List<? extends Object> item)
ItemWriteListener
onWriteError
in interface ItemWriteListener<Object>
onWriteError
in class ItemListenerSupport<Object,Object>
ex
- thrown from ItemWriter
item
- attempted to be written.Copyright © 2014 Pivotal. All rights reserved.