Class CompositePipelineListener

  • All Implemented Interfaces:
    PipelineListener

    public class CompositePipelineListener
    extends java.lang.Object
    implements PipelineListener
    Composite listener that delegates processing to other listeners.
    Author:
    Mahmoud Ben Hassine ([email protected])
    • Method Detail

      • beforeRecordProcessing

        public <P> Record<P> beforeRecordProcessing​(Record<P> record)
        Description copied from interface: PipelineListener
        Called before the record gets processed. If you create a new record, you must keep the original header of the modified record.
        Specified by:
        beforeRecordProcessing in interface PipelineListener
        Parameters:
        record - The record that will be processed.
        Returns:
        the pre-processed record
      • afterRecordProcessing

        public <P> void afterRecordProcessing​(Record<P> inputRecord,
                                              Record<P> outputRecord)
        Description copied from interface: PipelineListener
        Called after the record has been processed.
        Specified by:
        afterRecordProcessing in interface PipelineListener
        Parameters:
        inputRecord - The record to process.
        outputRecord - The processed record. May be null if the record has been filtered
      • onRecordProcessingException

        public <P> void onRecordProcessingException​(Record<P> record,
                                                    java.lang.Throwable throwable)
        Description copied from interface: PipelineListener
        Called when an exception occurs during record processing
        Specified by:
        onRecordProcessingException in interface PipelineListener
        Parameters:
        record - the record attempted to be processed
        throwable - the throwable that was thrown during record processing
      • addPipelineListener

        public void addPipelineListener​(PipelineListener pipelineListener)
        Add a delegate listener.
        Parameters:
        pipelineListener - to add