public abstract class AbstractListAggregationStrategy<V> extends Object implements org.apache.camel.AggregationStrategy
List of values defined by the getValue(Exchange) call. The combined
Exchange will hold all the aggregated exchanges in a List as a exchange property with the key
Exchange.GROUPED_EXCHANGE.
The method isStoreAsBodyOnCompletion() determines if the aggregated List should be stored on the
Message.setBody(Object) or be kept as a property on the exchange. List on the completed Exchange.| Constructor and Description |
|---|
AbstractListAggregationStrategy() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.Exchange |
aggregate(org.apache.camel.Exchange oldExchange,
org.apache.camel.Exchange newExchange)
This method will aggregate the old and new exchange and return the result.
|
abstract V |
getValue(org.apache.camel.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. |
void |
onCompletion(org.apache.camel.Exchange exchange) |
public abstract V getValue(org.apache.camel.Exchange exchange)
List.exchange - The exchange that is used to retrieve the value frompublic boolean isStoreAsBodyOnCompletion()
List as message body, or to keep as property on the exchange.
The default behavior is true to store as message body.public void onCompletion(org.apache.camel.Exchange exchange)
onCompletion in interface org.apache.camel.AggregationStrategypublic org.apache.camel.Exchange aggregate(org.apache.camel.Exchange oldExchange,
org.apache.camel.Exchange newExchange)
aggregate in interface org.apache.camel.AggregationStrategyoldExchange - The oldest exchange, can be nullnewExchange - The newest exchange, can be nullApache Camel