public class GroupedExchangeAggregationStrategy extends AbstractListAggregationStrategy<Exchange>
List
as a exchange property with the key
Exchange.GROUPED_EXCHANGE
.Constructor and Description |
---|
GroupedExchangeAggregationStrategy() |
Modifier and Type | Method and Description |
---|---|
Exchange |
aggregate(Exchange oldExchange,
Exchange newExchange)
This method will aggregate the old and new exchange and return the result.
|
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. |
onCompletion
public GroupedExchangeAggregationStrategy()
public boolean isStoreAsBodyOnCompletion()
AbstractListAggregationStrategy
List
as message body, or to keep as property on the exchange.
The default behavior is true to store as message body.isStoreAsBodyOnCompletion
in class AbstractListAggregationStrategy<Exchange>
public Exchange aggregate(Exchange oldExchange, Exchange newExchange)
AbstractListAggregationStrategy
aggregate
in interface AggregationStrategy
aggregate
in class AbstractListAggregationStrategy<Exchange>
oldExchange
- The oldest exchange, can be nullnewExchange
- The newest exchange, can be nullpublic Exchange getValue(Exchange exchange)
AbstractListAggregationStrategy
List
.getValue
in class AbstractListAggregationStrategy<Exchange>
exchange
- The exchange that is used to retrieve the value fromApache Camel