Class 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 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 interface org.apache.camel.AggregationStrategy