Package org.jeasy.batch.core.listener
Interface PipelineListener
-
- All Known Implementing Classes:
CompositePipelineListener
public interface PipelineListener
Enables the implementing class to get notified before/after the processing pipeline.- Author:
- Mario Mueller ([email protected])
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default <P> void
afterRecordProcessing(Record<P> inputRecord, Record<P> outputRecord)
Called after the record has been processed.default <P> Record<P>
beforeRecordProcessing(Record<P> record)
Called before the record gets processed.default <P> void
onRecordProcessingException(Record<P> record, java.lang.Throwable throwable)
Called when an exception occurs during record processing
-
-
-
Method Detail
-
beforeRecordProcessing
default <P> Record<P> beforeRecordProcessing(Record<P> record)
Called before the record gets processed. If you create a new record, you must keep the original header of the modified record.- Parameters:
record
- The record that will be processed.- Returns:
- the pre-processed record
-
afterRecordProcessing
default <P> void afterRecordProcessing(Record<P> inputRecord, Record<P> outputRecord)
Called after the record has been processed.- Parameters:
inputRecord
- The record to process.outputRecord
- The processed record. May benull
if the record has been filtered
-
onRecordProcessingException
default <P> void onRecordProcessingException(Record<P> record, java.lang.Throwable throwable)
Called when an exception occurs during record processing- Parameters:
record
- the record attempted to be processedthrowable
- the throwable that was thrown during record processing
-
-