Package org.springframework.batch.core.annotation
package org.springframework.batch.core.annotation
Annotations for java based configuration of listeners.
- Author:
- Michael Minella
-
ClassDescriptionMarks a method to be called after a chunk is executed.
Expected signature: void afterChunk(ChunkContext context)Marks a method to be called after a chunk has failed and been marked for rollback.
Expected signature: void afterFailedChunk(ChunkContext context)Marks a method to be called after aJob
has completed.Marks a method to be called after an item is passed to anItemProcessor
.Marks a method to be called after an item is read from anItemReader
Expected signature: void afterRead(T item)Marks a method to be called after aStep
has completed.Marks a method to be called after an item is passed to anItemWriter
.Marks a method to be called before a chunk is executed.Marks a method to be called before aJob
is executed, which comes after aJobExecution
is created and persisted but before the firstStep
is executed.Marks a method to be called before an item is passed to anItemProcessor
Expected signature: void beforeProcess(T item)Marks a method to be called before an item is read from anItemReader
Expected signature: void beforeRead()Marks a method to be called before aStep
is executed, which comes after aStepExecution
is created and persisted but before the first item is read.Marks a method to be called before a chunk is passed to anItemWriter
.Marks a method to be called if an exception is thrown by anItemProcessor
.Marks a method to be called if an exception is thrown by anItemReader
.Marks a method to be called when an item is skipped due to an exception thrown in theItemProcessor
.
Expected signature: void onSkipInProcess(T item,Throwable
t)Marks a method to be called when an item is skipped due to an exception thrown in theItemReader
.Marks a method to be called when an item is skipped due to an exception thrown in theItemWriter
.
Expected signature: void onSkipInWrite(S item,Throwable
t)Marks a method to be called if an exception is thrown by anItemWriter
.