Package org.apache.camel.builder
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 supportedAggregationStrategy
, 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 aAggregationStrategyBeanAdapter
for using a POJO as the aggregation strategy.static org.apache.camel.AggregationStrategy
bean(Class<?> type, String methodName)
Creates aAggregationStrategyBeanAdapter
for using a POJO as the aggregation strategy.static org.apache.camel.AggregationStrategy
bean(Object bean)
Creates aAggregationStrategyBeanAdapter
for using a POJO as the aggregation strategy.static org.apache.camel.AggregationStrategy
bean(Object bean, String methodName)
Creates aAggregationStrategyBeanAdapter
for using a POJO as the aggregation strategy.static org.apache.camel.AggregationStrategy
beanAllowNull(Class<?> type, String methodName)
Creates aAggregationStrategyBeanAdapter
for using a POJO as the aggregation strategy.static org.apache.camel.AggregationStrategy
beanAllowNull(Object bean, String methodName)
Creates aAggregationStrategyBeanAdapter
for using a POJO as the aggregation strategy.static FlexibleAggregationStrategy<Object>
flexible()
Creates aFlexibleAggregationStrategy
with no particular type, i.e.static <T> FlexibleAggregationStrategy<T>
flexible(Class<T> type)
Creates aFlexibleAggregationStrategy
pivoting around a particular type, e.g.static org.apache.camel.AggregationStrategy
groupedBody()
Creates aGroupedBodyAggregationStrategy
aggregation strategy.static org.apache.camel.AggregationStrategy
groupedExchange()
Creates aGroupedExchangeAggregationStrategy
aggregation strategy.static org.apache.camel.processor.aggregate.StringAggregationStrategy
string()
Creates aStringAggregationStrategy
.static org.apache.camel.processor.aggregate.StringAggregationStrategy
string(String delimiter)
Creates aStringAggregationStrategy
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
-
flexible
public static <T> FlexibleAggregationStrategy<T> flexible(Class<T> type)
Creates aFlexibleAggregationStrategy
pivoting around a particular type, e.g. it casts all pick expression results to the desired type.- Parameters:
type
- The type theFlexibleAggregationStrategy
deals with.
-
flexible
public static FlexibleAggregationStrategy<Object> flexible()
Creates aFlexibleAggregationStrategy
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 aGroupedExchangeAggregationStrategy
aggregation strategy.
-
groupedBody
public static org.apache.camel.AggregationStrategy groupedBody()
Creates aGroupedBodyAggregationStrategy
aggregation strategy.
-
bean
public static org.apache.camel.AggregationStrategy bean(Object bean)
Creates aAggregationStrategyBeanAdapter
for using a POJO as the aggregation strategy.
-
bean
public static org.apache.camel.AggregationStrategy bean(Object bean, String methodName)
Creates aAggregationStrategyBeanAdapter
for using a POJO as the aggregation strategy.
-
beanAllowNull
public static org.apache.camel.AggregationStrategy beanAllowNull(Object bean, String methodName)
Creates aAggregationStrategyBeanAdapter
for using a POJO as the aggregation strategy.
-
bean
public static org.apache.camel.AggregationStrategy bean(Class<?> type)
Creates aAggregationStrategyBeanAdapter
for using a POJO as the aggregation strategy.
-
bean
public static org.apache.camel.AggregationStrategy bean(Class<?> type, String methodName)
Creates aAggregationStrategyBeanAdapter
for using a POJO as the aggregation strategy.
-
beanAllowNull
public static org.apache.camel.AggregationStrategy beanAllowNull(Class<?> type, String methodName)
Creates aAggregationStrategyBeanAdapter
for using a POJO as the aggregation strategy.
-
string
public static org.apache.camel.processor.aggregate.StringAggregationStrategy string()
Creates aStringAggregationStrategy
.
-
string
public static org.apache.camel.processor.aggregate.StringAggregationStrategy string(String delimiter)
Creates aStringAggregationStrategy
with delimiter.- Parameters:
delimiter
- The delimiter to join with.
-
-