org.apache.camel.processor.aggregate
Class AggregationCollection

java.lang.Object
  extended by java.util.AbstractCollection<Exchange>
      extended by org.apache.camel.processor.aggregate.AggregationCollection
All Implemented Interfaces:
Iterable<Exchange>, Collection<Exchange>
Direct Known Subclasses:
PredicateAggregationCollection

public class AggregationCollection
extends AbstractCollection<Exchange>

A Collection which aggregates exchanges together using a correlation expression so that there is only a single message exchange sent for a single correlation key.

Version:
$Revision: 36321 $

Constructor Summary
AggregationCollection(Expression<Exchange> correlationExpression, AggregationStrategy aggregationStrategy)
           
 
Method Summary
 boolean add(Exchange exchange)
           
 void clear()
           
protected  Map<Object,Exchange> getMap()
           
 Iterator<Exchange> iterator()
           
protected  void onAggregation(Object correlationKey, Exchange newExchange)
          A strategy method allowing derived classes such as PredicateAggregationCollection to check to see if the aggregation has completed
 int size()
           
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

AggregationCollection

public AggregationCollection(Expression<Exchange> correlationExpression,
                             AggregationStrategy aggregationStrategy)
Method Detail

getMap

protected Map<Object,Exchange> getMap()

add

public boolean add(Exchange exchange)
Specified by:
add in interface Collection<Exchange>
Overrides:
add in class AbstractCollection<Exchange>

iterator

public Iterator<Exchange> iterator()
Specified by:
iterator in interface Iterable<Exchange>
Specified by:
iterator in interface Collection<Exchange>
Specified by:
iterator in class AbstractCollection<Exchange>

size

public int size()
Specified by:
size in interface Collection<Exchange>
Specified by:
size in class AbstractCollection<Exchange>

clear

public void clear()
Specified by:
clear in interface Collection<Exchange>
Overrides:
clear in class AbstractCollection<Exchange>

onAggregation

protected void onAggregation(Object correlationKey,
                             Exchange newExchange)
A strategy method allowing derived classes such as PredicateAggregationCollection to check to see if the aggregation has completed



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