|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.processor.aggregate.AbstractListAggregationStrategy<V>
public abstract class AbstractListAggregationStrategy<V>
Aggregate all exchanges into a 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
.
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 Summary | |
---|---|
AbstractListAggregationStrategy()
|
Method Summary | |
---|---|
Exchange |
aggregate(Exchange oldExchange,
Exchange newExchange)
This method will aggregate the old and new exchange and return the result. |
abstract V |
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. |
void |
onCompletion(Exchange exchange)
The aggregated Exchange has completed
Important: This method must not throw any exceptions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractListAggregationStrategy()
Method Detail |
---|
public abstract V getValue(Exchange exchange)
List
.
exchange
- The exchange that is used to retrieve the value from
public 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(Exchange exchange)
CompletionAwareAggregationStrategy
Exchange
has completed
Important: This method must not throw any exceptions.
onCompletion
in interface CompletionAwareAggregationStrategy
exchange
- the current aggregated exchange, or the original Exchange
if no aggregation
has been done before the completion occurredpublic Exchange aggregate(Exchange oldExchange, Exchange newExchange)
aggregate
in interface AggregationStrategy
oldExchange
- The oldest exchange, can be nullnewExchange
- The newest exchange, can be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |