Package jakarta.batch.api.chunk.listener
Class AbstractItemProcessListener
java.lang.Object
jakarta.batch.api.chunk.listener.AbstractItemProcessListener
- All Implemented Interfaces:
ItemProcessListener
The AbstractItemProcessListener provides default
implementations of less commonly implemented methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterProcess(Object item, Object result) Override this method if the ItemProcessListener will do something after the item is processed.voidbeforeProcess(Object item) Override this method if the ItemProcessListener will do something before the item is processed.voidonProcessError(Object item, Exception ex) Override this method if the ItemProcessListener will do something when the ItemProcessor processItem method throws an exception.
-
Constructor Details
-
AbstractItemProcessListener
public AbstractItemProcessListener()
-
-
Method Details
-
beforeProcess
Override this method if the ItemProcessListener will do something before the item is processed. The default implementation does nothing.- Specified by:
beforeProcessin interfaceItemProcessListener- Parameters:
item- specifies the item about to be processed.- Throws:
Exception- (or subclass) if an error occurs.
-
afterProcess
Override this method if the ItemProcessListener will do something after the item is processed. The default implementation does nothing.- Specified by:
afterProcessin interfaceItemProcessListener- Parameters:
item- specifies the item about to be processed.result- specifies the item to pass to the item writer.- Throws:
Exception- (or subclass) if an error occurs.
-
onProcessError
Override this method if the ItemProcessListener will do something when the ItemProcessor processItem method throws an exception. The default implementation does nothing.- Specified by:
onProcessErrorin interfaceItemProcessListener- Parameters:
item- specifies the item about to be processed.ex- specifies the exception thrown by the item processor.- Throws:
Exception- (or subclass) if an error occurs.
-