Class AggregatorAdapter
java.lang.Object
org.openehealth.ipf.platform.camel.core.adapter.AdapterSupport
org.openehealth.ipf.platform.camel.core.adapter.AggregatorAdapter
- All Implemented Interfaces:
AggregationStrategy
,Adapter
Adapts an
Aggregator
.- Author:
- Martin Krasser
-
Constructor Summary
ConstructorDescriptionAggregatorAdapter
(Aggregator aggregator) Creates a newAggregatorAdapter
and sets the delegateAggregator
. -
Method Summary
Modifier and TypeMethodDescriptionApplies expressions tooldExchange
andnewExchange
and delegates further processing todoAggregate(Exchange, Object, Object, Object...)
aggregationInput
(Closure aggregationInputExpressionLogic) aggregationInput
(Expression aggregationInputExpression) Sets anExpression
for obtaining data to be obtained from an additional (new)Exchange
.protected void
doAggregate
(Exchange oldExchange, Object oldInputData, Object newInputData, Object... inputParams) AggregatesoldInputData
andnewInputData
.Methods inherited from class org.openehealth.ipf.platform.camel.core.adapter.AdapterSupport
adaptInput, adaptParams, input, input, params, params, staticParams
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.AggregationStrategy
aggregate, canPreComplete, onCompletion, onCompletion, onOptimisticLockFailure, preComplete, timeout
-
Constructor Details
-
AggregatorAdapter
Creates a newAggregatorAdapter
and sets the delegateAggregator
.- Parameters:
aggregator
- an aggregator.
-
-
Method Details
-
aggregationInput
Sets anExpression
for obtaining data to be obtained from an additional (new)Exchange
. The default expression obtains the body from the input message.- Parameters:
aggregationInputExpression
- expression for obtaining aggregation input data.- Returns:
- this object.
- See Also:
-
aggregationInput
Sets an expressionClosure
for obtaining data to be obtained from an additional (new)Exchange
. The default expression obtains the body from the input message.- Parameters:
aggregationInputExpressionLogic
- expression for obtaining aggregation input data.- Returns:
- this object.
- See Also:
-
aggregate
Applies expressions tooldExchange
andnewExchange
and delegates further processing todoAggregate(Exchange, Object, Object, Object...)
- Specified by:
aggregate
in interfaceAggregationStrategy
- See Also:
-
doAggregate
protected void doAggregate(Exchange oldExchange, Object oldInputData, Object newInputData, Object... inputParams) AggregatesoldInputData
andnewInputData
. The aggregation result is written to body of the message returned byExchanges.resultMessage(Exchange)
.- Parameters:
oldExchange
- original message exchange to write results to.oldInputData
- original input datanewInputData
- additional input datainputParams
- input parameters
-