Class AggregationStrategyBiFunctionAdapter
- java.lang.Object
-
- org.apache.camel.processor.aggregate.AggregationStrategyBiFunctionAdapter
-
- All Implemented Interfaces:
org.apache.camel.AggregationStrategy
public class AggregationStrategyBiFunctionAdapter extends Object implements org.apache.camel.AggregationStrategy
AnAggregationStrategy
that adapts to aBiFunction
. This allows end users to useBiFunction
for the aggregation logic, instead of having to implement the Camel APIAggregationStrategy
. This is supported for example by camel-joor that makes it possible to write aBiFunction
as a lambda script that can be compiled and used by Camel.
-
-
Constructor Summary
Constructors Constructor Description AggregationStrategyBiFunctionAdapter(BiFunction<org.apache.camel.Exchange,org.apache.camel.Exchange,Object> function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.Exchange
aggregate(org.apache.camel.Exchange oldExchange, org.apache.camel.Exchange newExchange)
boolean
isAllowNullNewExchange()
boolean
isAllowNullOldExchange()
void
setAllowNullNewExchange(boolean allowNullNewExchange)
void
setAllowNullOldExchange(boolean allowNullOldExchange)
-
-
-
Constructor Detail
-
AggregationStrategyBiFunctionAdapter
public AggregationStrategyBiFunctionAdapter(BiFunction<org.apache.camel.Exchange,org.apache.camel.Exchange,Object> function)
-
-
Method Detail
-
isAllowNullOldExchange
public boolean isAllowNullOldExchange()
-
setAllowNullOldExchange
public void setAllowNullOldExchange(boolean allowNullOldExchange)
-
isAllowNullNewExchange
public boolean isAllowNullNewExchange()
-
setAllowNullNewExchange
public void setAllowNullNewExchange(boolean allowNullNewExchange)
-
aggregate
public org.apache.camel.Exchange aggregate(org.apache.camel.Exchange oldExchange, org.apache.camel.Exchange newExchange)
- Specified by:
aggregate
in interfaceorg.apache.camel.AggregationStrategy
-
-