org.apache.camel.processor.aggregate
Class GroupedExchangeAggregationStrategy

java.lang.Object
  extended by org.apache.camel.processor.aggregate.AbstractListAggregationStrategy<Exchange>
      extended by org.apache.camel.processor.aggregate.GroupedExchangeAggregationStrategy
All Implemented Interfaces:
AggregationStrategy, CompletionAwareAggregationStrategy

public class GroupedExchangeAggregationStrategy
extends AbstractListAggregationStrategy<Exchange>

Aggregate all exchanges into a single combined Exchange holding all the aggregated exchanges in a List as a exchange property with the key Exchange.GROUPED_EXCHANGE.

Version:

Constructor Summary
GroupedExchangeAggregationStrategy()
           
 
Method Summary
 Exchange getValue(Exchange exchange)
          This method is implemented by the sub-class and is called to retrieve an instance of the value that will be aggregated and forwarded to the receiving end point.
 boolean isStoreAsBodyOnCompletion()
          Whether to store the completed aggregated List as message body, or to keep as property on the exchange.
 
Methods inherited from class org.apache.camel.processor.aggregate.AbstractListAggregationStrategy
aggregate, onCompletion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupedExchangeAggregationStrategy

public GroupedExchangeAggregationStrategy()
Method Detail

isStoreAsBodyOnCompletion

public boolean isStoreAsBodyOnCompletion()
Description copied from class: AbstractListAggregationStrategy
Whether to store the completed aggregated List as message body, or to keep as property on the exchange.

The default behavior is true to store as message body.

Overrides:
isStoreAsBodyOnCompletion in class AbstractListAggregationStrategy<Exchange>
Returns:
true to store as message body, false to keep as property on the exchange.

getValue

public Exchange getValue(Exchange exchange)
Description copied from class: AbstractListAggregationStrategy
This method is implemented by the sub-class and is called to retrieve an instance of the value that will be aggregated and forwarded to the receiving end point.

If null is returned, then the value is not added to the List.

Specified by:
getValue in class AbstractListAggregationStrategy<Exchange>
Parameters:
exchange - The exchange that is used to retrieve the value from
Returns:
An instance of V that is the associated value of the passed exchange


Apache Camel