Class AggregationStrategies

java.lang.Object
org.apache.camel.builder.AggregationStrategies

public final class AggregationStrategies extends Object
Toolbox class to create commonly used Aggregation Strategies in a fluent manner. For more information about the supported AggregationStrategy, see links to the Javadocs of the relevant class below.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.camel.AggregationStrategy
    bean(Class<?> type)
    Creates a AggregationStrategyBeanAdapter for using a POJO as the aggregation strategy.
    static org.apache.camel.AggregationStrategy
    bean(Class<?> type, String methodName)
    Creates a AggregationStrategyBeanAdapter for using a POJO as the aggregation strategy.
    static org.apache.camel.AggregationStrategy
    bean(Object bean)
    Creates a AggregationStrategyBeanAdapter for using a POJO as the aggregation strategy.
    static org.apache.camel.AggregationStrategy
    bean(Object bean, String methodName)
    Creates a AggregationStrategyBeanAdapter for using a POJO as the aggregation strategy.
    static org.apache.camel.AggregationStrategy
    beanAllowNull(Class<?> type, String methodName)
    Creates a AggregationStrategyBeanAdapter for using a POJO as the aggregation strategy.
    static org.apache.camel.AggregationStrategy
    beanAllowNull(Object bean, String methodName)
    Creates a AggregationStrategyBeanAdapter for using a POJO as the aggregation strategy.
    Creates a FlexibleAggregationStrategy with no particular type, i.e.
    flexible(Class<T> type)
    Creates a FlexibleAggregationStrategy pivoting around a particular type, e.g.
    static org.apache.camel.AggregationStrategy
    Creates a GroupedBodyAggregationStrategy aggregation strategy.
    static org.apache.camel.AggregationStrategy
    Creates a GroupedExchangeAggregationStrategy aggregation strategy.
    static org.apache.camel.processor.aggregate.StringAggregationStrategy
    Creates a StringAggregationStrategy.
    static org.apache.camel.processor.aggregate.StringAggregationStrategy
    string(String delimiter)
    Creates a StringAggregationStrategy with delimiter.
    static org.apache.camel.AggregationStrategy
    Use the latest incoming exchange.
    static org.apache.camel.AggregationStrategy
    Use the original exchange.
    static org.apache.camel.AggregationStrategy
    useOriginal(boolean propagateException)
    Use the original exchange.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • flexible

      public static <T> FlexibleAggregationStrategy<T> flexible(Class<T> type)
      Creates a FlexibleAggregationStrategy pivoting around a particular type, e.g. it casts all pick expression results to the desired type.
      Parameters:
      type - The type the FlexibleAggregationStrategy deals with.
    • flexible

      public static FlexibleAggregationStrategy<Object> flexible()
      Creates a FlexibleAggregationStrategy with no particular type, i.e. performing no casts or type conversion of pick expression results.
    • useLatest

      public static org.apache.camel.AggregationStrategy useLatest()
      Use the latest incoming exchange.
      See Also:
      • UseLatestAggregationStrategy
    • useOriginal

      public static org.apache.camel.AggregationStrategy useOriginal()
      Use the original exchange.
      See Also:
      • UseOriginalAggregationStrategy
    • useOriginal

      public static org.apache.camel.AggregationStrategy useOriginal(boolean propagateException)
      Use the original exchange.
      Parameters:
      propagateException - whether to propgate exception if errors was thrown during processing split messages.
      See Also:
      • UseOriginalAggregationStrategy
    • groupedExchange

      public static org.apache.camel.AggregationStrategy groupedExchange()
      Creates a GroupedExchangeAggregationStrategy aggregation strategy.
    • groupedBody

      public static org.apache.camel.AggregationStrategy groupedBody()
      Creates a GroupedBodyAggregationStrategy aggregation strategy.
    • bean

      public static org.apache.camel.AggregationStrategy bean(Object bean)
      Creates a AggregationStrategyBeanAdapter for using a POJO as the aggregation strategy.
    • bean

      public static org.apache.camel.AggregationStrategy bean(Object bean, String methodName)
      Creates a AggregationStrategyBeanAdapter for using a POJO as the aggregation strategy.
    • beanAllowNull

      public static org.apache.camel.AggregationStrategy beanAllowNull(Object bean, String methodName)
      Creates a AggregationStrategyBeanAdapter for using a POJO as the aggregation strategy.
    • bean

      public static org.apache.camel.AggregationStrategy bean(Class<?> type)
      Creates a AggregationStrategyBeanAdapter for using a POJO as the aggregation strategy.
    • bean

      public static org.apache.camel.AggregationStrategy bean(Class<?> type, String methodName)
      Creates a AggregationStrategyBeanAdapter for using a POJO as the aggregation strategy.
    • beanAllowNull

      public static org.apache.camel.AggregationStrategy beanAllowNull(Class<?> type, String methodName)
      Creates a AggregationStrategyBeanAdapter for using a POJO as the aggregation strategy.
    • string

      public static org.apache.camel.processor.aggregate.StringAggregationStrategy string()
      Creates a StringAggregationStrategy.
    • string

      public static org.apache.camel.processor.aggregate.StringAggregationStrategy string(String delimiter)
      Creates a StringAggregationStrategy with delimiter.
      Parameters:
      delimiter - The delimiter to join with.