T
- type of object being readpublic class SynchronizedItemStreamReader<T> extends java.lang.Object implements ItemStreamReader<T>, org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
SynchronizedItemStreamReader() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
close()
If any resources are needed for the stream to operate they need to be destroyed here.
|
void |
open(ExecutionContext executionContext)
Open the stream for the provided
ExecutionContext . |
T |
read()
This delegates to the read method of the
delegate |
void |
setDelegate(ItemStreamReader<T> delegate) |
void |
update(ExecutionContext executionContext)
Indicates that the execution context provided during open is about to be saved.
|
public void setDelegate(ItemStreamReader<T> delegate)
public T read() throws java.lang.Exception, UnexpectedInputException, ParseException, NonTransientResourceException
delegate
read
in interface ItemReader<T>
ParseException
- if there is a problem parsing the current record
(but the next one may still be valid)NonTransientResourceException
- if there is a fatal exception in
the underlying resource. After throwing this exception implementations
should endeavour to return null from subsequent calls to read.UnexpectedInputException
- if there is an uncategorised problem
with the input data. Assume potentially transient, so subsequent calls to
read might succeed.java.lang.Exception
- if an there is a non-specific error.public void close()
ItemStream
close
in interface ItemStream
public void open(ExecutionContext executionContext)
ItemStream
ExecutionContext
.open
in interface ItemStream
executionContext
- current step's ExecutionContext
. Will be the
executionContext from the last run of the step on a restart.public void update(ExecutionContext executionContext)
ItemStream
update
in interface ItemStream
executionContext
- to be updatedpublic void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception