Class AdapterSupport
java.lang.Object
org.openehealth.ipf.platform.camel.core.adapter.AdapterSupport
- All Implemented Interfaces:
Adapter
- Direct Known Subclasses:
AggregatorAdapter
,DataFormatAdapter
,PredicateAdapter
,ProcessorAdapter
Abstract base class for classes that adapt transform support library
interfaces to Apache Camel interfaces.
- Author:
- Martin Krasser
-
Constructor Summary
ConstructorDescriptionCreates an adapter that by default takes input data from the body of the in-message. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
adaptInput
(Exchange exchange) protected Object
adaptParams
(Exchange exchange) Applies theExpression
set byparams(Expression)
(or implicitly set bystaticParams(Object...)
) to obtain input params from theexchange
.input
(Expression inputExpression) Sets anExpression
for obtaining input data from anExchange
.params
(Expression paramsExpression) Sets anExpression
for obtaining input params from anExchange
.staticParams
(Object... params) Configures this adapter to use the givenparams
independent of theExchange
to be processed.
-
Constructor Details
-
AdapterSupport
public AdapterSupport()Creates an adapter that by default takes input data from the body of the in-message.- See Also:
-
-
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. -
input
Description copied from interface:Adapter
-
params
Description copied from interface:Adapter
Sets anExpression
for obtaining input params from anExchange
. Input params are passed to adapted modules API implementations. -
params
Description copied from interface:Adapter
-
staticParams
Description copied from interface:Adapter
Configures this adapter to use the givenparams
independent of theExchange
to be processed.- Specified by:
staticParams
in interfaceAdapter
- Parameters:
params
- expression for obtaining input params.- Returns:
- this object.
-
adaptInput
- Parameters:
exchange
- message exchange.- Returns:
- input data or
null
if the expression evaluates tonull
or the expression object isnull
.
-
adaptParams
Applies theExpression
set byparams(Expression)
(or implicitly set bystaticParams(Object...)
) to obtain input params from theexchange
.- Parameters:
exchange
- message exchange.- Returns:
- input data or
null
if the expression evaluates tonull
or the expression object isnull
.
-