java.lang.Object
jakarta.batch.api.chunk.AbstractItemReader
- All Implemented Interfaces:
ItemReader
The AbstractItemReader provides default implementations
of less commonly implemented methods.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionOverride this method if the ItemReader supports checkpoints.void
close()
Override this method if the ItemReader requires any close time processing.void
open
(Serializable checkpoint) Override this method if the ItemReader requires any open time processing.abstract Object
readItem()
Implement read logic for the ItemReader in this method.
-
Constructor Details
-
AbstractItemReader
public AbstractItemReader()
-
-
Method Details
-
open
Override this method if the ItemReader requires any open time processing. The default implementation does nothing.- Specified by:
open
in interfaceItemReader
- Parameters:
checkpoint
- last checkpoint for this ItemReader - may be null.- Throws:
Exception
- (or subclass) if an error occurs.
-
close
Override this method if the ItemReader requires any close time processing. The default implementation does nothing.- Specified by:
close
in interfaceItemReader
- Throws:
Exception
- (or subclass) if an error occurs.
-
readItem
Implement read logic for the ItemReader in this method.- Specified by:
readItem
in interfaceItemReader
- Returns:
- next item or null
- Throws:
Exception
- (or subclass) if an error occurs.
-
checkpointInfo
Override this method if the ItemReader supports checkpoints. The default implementation returns null.- Specified by:
checkpointInfo
in interfaceItemReader
- Returns:
- checkpoint data
- Throws:
Exception
- (or subclass) if an error occurs.
-