- java.lang.Object
-
- jakarta.batch.api.chunk.AbstractItemReader
-
- All Implemented Interfaces:
ItemReader
public abstract class AbstractItemReader extends java.lang.Object implements ItemReader
The AbstractItemReader provides default implementations of less commonly implemented methods.
-
-
Constructor Summary
Constructors Constructor Description AbstractItemReader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.io.SerializablecheckpointInfo()Override this method if the ItemReader supports checkpoints.voidclose()Override this method if the ItemReader requires any close time processing.voidopen(java.io.Serializable checkpoint)Override this method if the ItemReader requires any open time processing.abstract java.lang.ObjectreadItem()Implement read logic for the ItemReader in this method.
-
-
-
Method Detail
-
open
public void open(java.io.Serializable checkpoint) throws java.lang.ExceptionOverride this method if the ItemReader requires any open time processing. The default implementation does nothing.- Specified by:
openin interfaceItemReader- Parameters:
checkpoint- last checkpoint for this ItemReader - may be null.- Throws:
java.lang.Exception- (or subclass) if an error occurs.
-
close
public void close() throws java.lang.ExceptionOverride this method if the ItemReader requires any close time processing. The default implementation does nothing.- Specified by:
closein interfaceItemReader- Throws:
java.lang.Exception- (or subclass) if an error occurs.
-
readItem
public abstract java.lang.Object readItem() throws java.lang.ExceptionImplement read logic for the ItemReader in this method.- Specified by:
readItemin interfaceItemReader- Returns:
- next item or null
- Throws:
java.lang.Exception- (or subclass) if an error occurs.
-
checkpointInfo
public java.io.Serializable checkpointInfo() throws java.lang.ExceptionOverride this method if the ItemReader supports checkpoints. The default implementation returns null.- Specified by:
checkpointInfoin interfaceItemReader- Returns:
- checkpoint data
- Throws:
java.lang.Exception- (or subclass) if an error occurs.
-
-