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
An
AggregationStrategy
that adapts to a BiFunction
.
This allows end users to use BiFunction
for the aggregation logic, instead of having to implement the Camel
API AggregationStrategy
.
This is supported for example by camel-joor that makes it possible to write a BiFunction
as a lambda script
that can be compiled and used by Camel.-
Constructor Summary
ConstructorDescriptionAggregationStrategyBiFunctionAdapter
(BiFunction<org.apache.camel.Exchange, org.apache.camel.Exchange, Object> function) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.Exchange
aggregate
(org.apache.camel.Exchange oldExchange, org.apache.camel.Exchange newExchange) boolean
boolean
void
setAllowNullNewExchange
(boolean allowNullNewExchange) void
setAllowNullOldExchange
(boolean allowNullOldExchange) 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
-
AggregationStrategyBiFunctionAdapter
public AggregationStrategyBiFunctionAdapter(BiFunction<org.apache.camel.Exchange, org.apache.camel.Exchange, Object> function)
-
-
Method Details
-
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
-