public class UseOriginalAggregationStrategy extends Object implements AggregationStrategy
AggregationStrategy
which just uses the original exchange
which can be needed when you want to preserve the original Exchange. For example when splitting an Exchange
and then you may want to keep routing using the original Exchange
.Splitter
Constructor and Description |
---|
UseOriginalAggregationStrategy() |
UseOriginalAggregationStrategy(boolean propagateException) |
UseOriginalAggregationStrategy(Exchange original,
boolean propagateException) |
Modifier and Type | Method and Description |
---|---|
Exchange |
aggregate(Exchange oldExchange,
Exchange newExchange)
Aggregates an old and new exchange together to create a single combined exchange
|
protected Exception |
checkException(Exchange oldExchange,
Exchange newExchange) |
Exchange |
getOriginal() |
UseOriginalAggregationStrategy |
newInstance(Exchange original)
Creates a new instance as a clone of this strategy with the new given original.
|
void |
setOriginal(Exchange original)
Deprecated.
|
String |
toString() |
public UseOriginalAggregationStrategy()
public UseOriginalAggregationStrategy(boolean propagateException)
public UseOriginalAggregationStrategy(Exchange original, boolean propagateException)
public UseOriginalAggregationStrategy newInstance(Exchange original)
public Exchange aggregate(Exchange oldExchange, Exchange newExchange)
AggregationStrategy
aggregate
in interface AggregationStrategy
oldExchange
- the oldest exchange (is null on first aggregation as we only have the new exchange)newExchange
- the newest exchange (can be null if there was no data possible to acquire)protected Exception checkException(Exchange oldExchange, Exchange newExchange)
public Exchange getOriginal()
@Deprecated public void setOriginal(Exchange original)
Apache Camel