Class 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

      All Methods Static Methods Concrete Methods 
      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.
      static FlexibleAggregationStrategy<Object> flexible()
      Creates a FlexibleAggregationStrategy with no particular type, i.e.
      static <T> FlexibleAggregationStrategy<T> flexible​(Class<T> type)
      Creates a FlexibleAggregationStrategy pivoting around a particular type, e.g.
      static org.apache.camel.AggregationStrategy groupedBody()
      Creates a GroupedBodyAggregationStrategy aggregation strategy.
      static org.apache.camel.AggregationStrategy groupedExchange()
      Creates a GroupedExchangeAggregationStrategy aggregation strategy.
      static org.apache.camel.processor.aggregate.StringAggregationStrategy string()
      Creates a StringAggregationStrategy.
      static org.apache.camel.processor.aggregate.StringAggregationStrategy string​(String delimiter)
      Creates a StringAggregationStrategy with delimiter.
      static org.apache.camel.AggregationStrategy useLatest()
      Use the latest incoming exchange.
      static org.apache.camel.AggregationStrategy useOriginal()
      Use the original exchange.
      static org.apache.camel.AggregationStrategy useOriginal​(boolean propagateException)
      Use the original exchange.
    • Method Detail

      • 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.