Package jakarta.batch.api.chunk.listener
Class AbstractItemReadListener
java.lang.Object
jakarta.batch.api.chunk.listener.AbstractItemReadListener
- All Implemented Interfaces:
ItemReadListener
The AbstractItemReadListener provides default
implementations of less commonly implemented methods.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Override this method if the ItemReadListener will do something after the item is read.void
Override this method if the ItemReadListener will do something before the item is read.void
onReadError
(Exception ex) Override this method if the ItemReadListener will do something when the ItemReader readItem method throws an exception.
-
Constructor Details
-
AbstractItemReadListener
public AbstractItemReadListener()
-
-
Method Details
-
beforeRead
Override this method if the ItemReadListener will do something before the item is read. The default implementation does nothing.- Specified by:
beforeRead
in interfaceItemReadListener
- Throws:
Exception
- (or subclass) if an error occurs.
-
afterRead
Override this method if the ItemReadListener will do something after the item is read. The default implementation does nothing.- Specified by:
afterRead
in interfaceItemReadListener
- Parameters:
item
- last item read by ItemReader- Throws:
Exception
- (or subclass) if an error occurs.
-
onReadError
Override this method if the ItemReadListener will do something when the ItemReader readItem method throws an exception. The default implementation does nothing.- Specified by:
onReadError
in interfaceItemReadListener
- Parameters:
ex
- exception thrown from readItem method- Throws:
Exception
- (or subclass) if an error occurs.
-