Class ProcessorAdapter
java.lang.Object
org.openehealth.ipf.platform.camel.core.adapter.AdapterSupport
org.openehealth.ipf.platform.camel.core.adapter.ProcessorAdapter
- Direct Known Subclasses:
ConverterAdapter
,HapiAdapter
,ParserAdapter
,RendererAdapter
,TransmogrifierAdapter
,ValidatorAdapter
Abstract base class for classes that adapt transform support library
interfaces to Apache Camel's
Processor
.- Author:
- Martin Krasser
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
Processes input data and populates the output exchange.input
(Expression inputExpression) Sets anExpression
for obtaining input data from anExchange
.params
(Expression paramsExpression) Sets anExpression
for obtaining input params from anExchange
.void
Dispatches theexchange
todoProcess(Exchange, Object, Object...)
implementations.staticParams
(Object... params) Configures this adapter to use the givenparams
independent of theExchange
to be processed.Methods inherited from class org.openehealth.ipf.platform.camel.core.adapter.AdapterSupport
adaptInput, adaptParams, input, params
-
Constructor Details
-
ProcessorAdapter
public ProcessorAdapter()
-
-
Method Details
-
input
Description copied from interface:Adapter
Sets anExpression
for obtaining input data from anExchange
. Input data are passed to adapted modules API implementations.- Specified by:
input
in interfaceAdapter
- Overrides:
input
in classAdapterSupport
- Parameters:
inputExpression
- expression for obtaining input data.- Returns:
- this object.
-
params
Description copied from interface:Adapter
Sets anExpression
for obtaining input params from anExchange
. Input params are passed to adapted modules API implementations.- Specified by:
params
in interfaceAdapter
- Overrides:
params
in classAdapterSupport
- Parameters:
paramsExpression
- expression for obtaining input params.- Returns:
- this object.
-
staticParams
Description copied from interface:Adapter
Configures this adapter to use the givenparams
independent of theExchange
to be processed.- Specified by:
staticParams
in interfaceAdapter
- Overrides:
staticParams
in classAdapterSupport
- Parameters:
params
- expression for obtaining input params.- Returns:
- this object.
-
process
Dispatches theexchange
todoProcess(Exchange, Object, Object...)
implementations. -
doProcess
protected abstract void doProcess(Exchange exchange, Object inputData, Object... inputParams) throws Exception Processes input data and populates the output exchange.- Parameters:
exchange
- message exchange where to write processing results.inputData
- input data.inputParams
- input parameters.- Throws:
Exception
- if a processing error occurs.
-