org.apache.camel.processor.aggregate
Class UseLatestAggregationStrategy

java.lang.Object
  extended by org.apache.camel.processor.aggregate.UseLatestAggregationStrategy
All Implemented Interfaces:
AggregationStrategy

public class UseLatestAggregationStrategy
extends Object
implements AggregationStrategy

An AggregationStrategy which just uses the latest exchange which is useful for status messages where old status messages have no real value; another example is things like market data prices, where old stock prices are not that relevant, only the current price is.

Version:
$Revision: 35332 $

Constructor Summary
UseLatestAggregationStrategy()
           
 
Method Summary
 Exchange aggregate(Exchange oldExchange, Exchange newExchange)
          Aggregates an old and new exchange together to create a single combined exchange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UseLatestAggregationStrategy

public UseLatestAggregationStrategy()
Method Detail

aggregate

public Exchange aggregate(Exchange oldExchange,
                          Exchange newExchange)
Description copied from interface: AggregationStrategy
Aggregates an old and new exchange together to create a single combined exchange

Specified by:
aggregate in interface AggregationStrategy
Parameters:
oldExchange - the oldest exchange
newExchange - the newest exchange
Returns:
a combined composite of the two exchanges


Copyright © 2008 IONA Open Source Community. All Rights Reserved.