org.apache.camel.processor.aggregate
Class GroupedExchangeAggregationStrategy
java.lang.Object
org.apache.camel.processor.aggregate.AbstractListAggregationStrategy<Exchange>
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:
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroupedExchangeAggregationStrategy
public GroupedExchangeAggregationStrategy()
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