|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.core.listener.StepListenerSupport
public class StepListenerSupport
Basic no-op implementations of all StepListener implementations.
| Constructor Summary | |
|---|---|
StepListenerSupport()
|
|
| Method Summary | |
|---|---|
void |
afterChunk()
Callback after the chunk is executed, but inside the transaction. |
void |
afterRead(Object item)
Called after ItemReader.read() |
ExitStatus |
afterStep(StepExecution stepExecution)
Give a listener a chance to modify the exit status from a step. |
void |
afterWrite(Object item)
Called after ItemWriter.write(Object) If the item is last in a
chunk, this will be called before any transaction is committed, and
before ChunkListener.afterChunk() |
void |
beforeChunk()
Callback before the chunk is executed, but inside the transaction. |
void |
beforeRead()
Called before ItemReader.read() |
void |
beforeStep(StepExecution stepExecution)
Initialise the state of the listener with the StepExecution from
the current scope. |
void |
beforeWrite(Object item)
Called before ItemWriter.write(Object) |
ExitStatus |
onErrorInStep(StepExecution stepExecution,
Throwable e)
The value returned will be combined with the normal exit status using ExitStatus.and(ExitStatus). |
void |
onReadError(Exception ex)
Called if an error occurs while trying to write. |
void |
onWriteError(Exception ex,
Object item)
Called if an error occurs while trying to write. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StepListenerSupport()
| Method Detail |
|---|
public ExitStatus afterStep(StepExecution stepExecution)
StepExecutionListenerExitStatus.and(ExitStatus).
Called after successful execution of step's processing logic. Throwing
exception in this method will cause step to fail.
afterStep in interface StepExecutionListenerExitStatus to combine with the normal value. Return
null to leave the old value unchanged.public void beforeStep(StepExecution stepExecution)
StepExecutionListenerStepExecution from
the current scope.
beforeStep in interface StepExecutionListener
public ExitStatus onErrorInStep(StepExecution stepExecution,
Throwable e)
StepExecutionListenerExitStatus.and(ExitStatus).
onErrorInStep in interface StepExecutionListenere - an exception thrown by the step execution
public void afterChunk()
ChunkListener
afterChunk in interface ChunkListenerpublic void beforeChunk()
ChunkListener
beforeChunk in interface ChunkListenerpublic void afterRead(Object item)
ItemReadListenerItemReader.read()
afterRead in interface ItemReadListeneritem - returned from read()public void beforeRead()
ItemReadListenerItemReader.read()
beforeRead in interface ItemReadListenerpublic void onReadError(Exception ex)
ItemReadListener
onReadError in interface ItemReadListenerex - thrown from ItemWriterpublic void afterWrite(Object item)
ItemWriteListenerItemWriter.write(Object) If the item is last in a
chunk, this will be called before any transaction is committed, and
before ChunkListener.afterChunk()
afterWrite in interface ItemWriteListeneritem - written itempublic void beforeWrite(Object item)
ItemWriteListenerItemWriter.write(Object)
beforeWrite in interface ItemWriteListeneritem - to be written
public void onWriteError(Exception ex,
Object item)
ItemWriteListener
onWriteError in interface ItemWriteListenerex - thrown from ItemWriteritem - attempted to be written.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||