|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.listener.StepListenerSupport<T,S>
public class StepListenerSupport<T,S>
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 |
afterProcess(T item,
S result)
Called after ItemProcessor.process(Object) returns. |
void |
afterRead(T item)
Called after ItemReader.read() |
ExitStatus |
afterStep(StepExecution stepExecution)
Give a listener a chance to modify the exit status from a step. |
void |
afterWrite(List<? extends S> items)
Called after ItemWriter.write(java.util.List) 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 |
beforeProcess(T item)
Called before ItemProcessor.process(Object) . |
void |
beforeRead()
Called before ItemReader.read() |
void |
beforeStep(StepExecution stepExecution)
Initialize the state of the listener with the StepExecution from
the current scope. |
void |
beforeWrite(List<? extends S> items)
Called before ItemWriter.write(java.util.List) |
ExitStatus |
onErrorInStep(StepExecution stepExecution,
Throwable e)
|
void |
onProcessError(T item,
Exception e)
Called if an exception was thrown from ItemProcessor.process(Object) . |
void |
onReadError(Exception ex)
Called if an error occurs while trying to read. |
void |
onWriteError(Exception exception,
List<? extends S> items)
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)
StepExecutionListener
ExitStatus.and(ExitStatus)
.
Called after execution of step's processing logic (both successful or
failed). Throwing exception in this method has no effect, it will only be
logged.
afterStep
in interface StepExecutionListener
ExitStatus
to combine with the normal value. Return
null to leave the old value unchanged.public void beforeStep(StepExecution stepExecution)
StepExecutionListener
StepExecution
from
the current scope.
beforeStep
in interface StepExecutionListener
public ExitStatus onErrorInStep(StepExecution stepExecution, Throwable e)
public void afterChunk()
ChunkListener
afterChunk
in interface ChunkListener
public void beforeChunk()
ChunkListener
beforeChunk
in interface ChunkListener
public void afterRead(T item)
ItemReadListener
ItemReader.read()
afterRead
in interface ItemReadListener<T>
item
- returned from read()public void beforeRead()
ItemReadListener
ItemReader.read()
beforeRead
in interface ItemReadListener<T>
public void onReadError(Exception ex)
ItemReadListener
onReadError
in interface ItemReadListener<T>
ex
- thrown from ItemWriter
public void afterWrite(List<? extends S> items)
ItemWriteListener
ItemWriter.write(java.util.List)
This will be
called before any transaction is committed, and before
ChunkListener.afterChunk()
afterWrite
in interface ItemWriteListener<S>
items
- written itemspublic void beforeWrite(List<? extends S> items)
ItemWriteListener
ItemWriter.write(java.util.List)
beforeWrite
in interface ItemWriteListener<S>
items
- to be writtenpublic void onWriteError(Exception exception, List<? extends S> items)
ItemWriteListener
onWriteError
in interface ItemWriteListener<S>
exception
- thrown from ItemWriter
items
- attempted to be written.public void afterProcess(T item, S result)
ItemProcessListener
ItemProcessor.process(Object)
returns. If the
processor returns null, this method will still be called, with
a null result, allowing for notification of 'filtered' items.
afterProcess
in interface ItemProcessListener<T,S>
item
- to be processedresult
- of processingpublic void beforeProcess(T item)
ItemProcessListener
ItemProcessor.process(Object)
.
beforeProcess
in interface ItemProcessListener<T,S>
item
- to be processed.public void onProcessError(T item, Exception e)
ItemProcessListener
ItemProcessor.process(Object)
.
onProcessError
in interface ItemProcessListener<T,S>
item
- attempted to be processede
- - exception thrown during processing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |