Package org.jeasy.batch.core.processor
Interface RecordProcessor<I,O>
-
- Type Parameters:
I
- The payload's type of input recordsO
- The payload's type of output records
- All Known Subinterfaces:
RecordFilter<R>
,RecordMapper<I,O>
,RecordMarshaller<I,O>
,RecordValidator<R>
- All Known Implementing Classes:
CompositeRecordProcessor
,EmptyStringRecordFilter
,EndsWithStringRecordFilter
,FileExtensionFilter
,FilteredRecordsCollector
,GrepFilter
,HeaderRecordFilter
,RecordCollector
,RecordCompactor
,RetryableRecordProcessor
,StartsWithStringRecordFilter
public interface RecordProcessor<I,O>
A record processor performs business logic on input records and produces output records. The output record may be of a different type than the input record and will be piped out to the next processor if any. If a record processor throws an exception during processing, the record will be reported as an error. If a record processor returnsnull
, the record will be filtered and next processors in the pipeline will be skipped.- Author:
- Mahmoud Ben Hassine ([email protected])
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Record<O>
processRecord(Record<I> record)
Process a record.
-
-
-
Method Detail
-
processRecord
Record<O> processRecord(Record<I> record) throws java.lang.Exception
Process a record.- Parameters:
record
- to process.- Returns:
- the processed record, may be of a different type than the input record, or
null
to skip next processors - Throws:
java.lang.Exception
- if an error occurs during record processing
-
-