Chunk operation provides a wealth of interceptor mechanism, interceptor additional control capability can be achieved, such as logging, task tracking, status reporting capabilities, data transfer, etc.,
In the process SpringBatch in, keep it simple business as much as possible, the need for any additional processing functions implemented in the interceptor
Chunk Interceptor Interface
Chunk interceptor scope:
JobExecutionListener
StepExecutionListener
Tasklet
ChunkListner
ItemReadListener
ItemProcessListener
ItemWriteListener
Chunk interceptor implementation of the order:
JobExecutionListener .beforeJob()
StepExecutionListener.beforeStep()
ChunkListener.beforeChunk()
ItemReadListener.beforeRead()
ItemReadListener.afterRead()
ItemProcessListener.beforeProcess()
ItemProcessListener.afterProess()
ItemWriteListener.beforeWrite()
ItemWriteListener.afterWrite()
ChunListener.afterChunk()
StepExecutionListener.afterStep()
JobExecutionListener .afterJob()