Package jakarta.batch.api.chunk.listener
Class AbstractItemReadListener
- java.lang.Object
-
- jakarta.batch.api.chunk.listener.AbstractItemReadListener
-
- All Implemented Interfaces:
ItemReadListener
public abstract class AbstractItemReadListener extends Object implements ItemReadListener
The AbstractItemReadListener provides default implementations of less commonly implemented methods.
-
-
Constructor Summary
Constructors Constructor Description AbstractItemReadListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterRead(Object item)Override this method if the ItemReadListener will do something after the item is read.voidbeforeRead()Override this method if the ItemReadListener will do something before the item is read.voidonReadError(Exception ex)Override this method if the ItemReadListener will do something when the ItemReader readItem method throws an exception.
-
-
-
Method Detail
-
beforeRead
public void beforeRead() throws ExceptionOverride this method if the ItemReadListener will do something before the item is read. The default implementation does nothing.- Specified by:
beforeReadin interfaceItemReadListener- Throws:
Exception- (or subclass) if an error occurs.
-
afterRead
public void afterRead(Object item) throws Exception
Override this method if the ItemReadListener will do something after the item is read. The default implementation does nothing.- Specified by:
afterReadin interfaceItemReadListener- Parameters:
item- last item read by ItemReader- Throws:
Exception- (or subclass) if an error occurs.
-
onReadError
public void onReadError(Exception ex) throws Exception
Override this method if the ItemReadListener will do something when the ItemReader readItem method throws an exception. The default implementation does nothing.- Specified by:
onReadErrorin interfaceItemReadListener- Parameters:
ex- exception thrown from readItem method- Throws:
Exception- (or subclass) if an error occurs.
-
-