IN
- type of inputOUT
- type of outputpublic abstract class RawProcessor<IN,OUT> extends Object implements Processor<ValueHolder<IN>,ValueHolder<OUT>>
This class allows to declare a Processor
with "raw" types, that
is inputs and outputs which do not implement MessageProvider
. Inputs
and outputs are automatically wrapped into a ValueHolder
.
Implementations of this class are only required to provide a name by which the input and output will be identified in a processing message.
Modifier | Constructor and Description |
---|---|
protected |
RawProcessor(String inputName,
String outputName)
Protected constructor
|
Modifier and Type | Method and Description |
---|---|
protected ProcessingMessage |
newMessage(IN rawInput)
Create a new processing message for reporting purposes
|
ValueHolder<OUT> |
process(ProcessingReport report,
ValueHolder<IN> input)
Process the input
|
protected abstract OUT |
rawProcess(ProcessingReport report,
IN input)
Process a raw input, return a raw output
|
protected abstract OUT rawProcess(ProcessingReport report, IN input) throws ProcessingException
report
- the report to useinput
- the raw inputProcessingException
- processing failurenewMessage(Object)
public final ValueHolder<OUT> process(ProcessingReport report, ValueHolder<IN> input) throws ProcessingException
Processor
process
in interface Processor<ValueHolder<IN>,ValueHolder<OUT>>
report
- the report to use while processinginput
- the input for this processorProcessingException
- processing failedprotected final ProcessingMessage newMessage(IN rawInput)
rawInput
- the raw input