org.apache.camel.processor.aggregate
Class PredicateAggregationCollection

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

public class PredicateAggregationCollection
extends DefaultAggregationCollection

An aggregator collection which uses a predicate to decide when an aggregation is completed for a particular correlation key

Version:
$Revision: 777808 $

Constructor Summary
PredicateAggregationCollection(Expression correlationExpression, AggregationStrategy aggregationStrategy, Predicate aggregationCompletedPredicate)
           
 
Method Summary
 void clear()
          Clears this collection
 Iterator<Exchange> iterator()
          Gets the iterator to iterate this collection.
 void onAggregation(Object correlationKey, Exchange exchange)
          A strategy method allowing derived classes such as PredicateAggregationCollection to check to see if the aggregation has completed
 int size()
          Gets the size of this collection
 
Methods inherited from class org.apache.camel.processor.aggregate.DefaultAggregationCollection
add, getAggregated, getAggregationStrategy, getCorrelationExpression, setAggregationStrategy, setCorrelationExpression
 
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
addAll, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

PredicateAggregationCollection

public PredicateAggregationCollection(Expression correlationExpression,
                                      AggregationStrategy aggregationStrategy,
                                      Predicate aggregationCompletedPredicate)
Method Detail

onAggregation

public void onAggregation(Object correlationKey,
                          Exchange exchange)
Description copied from interface: AggregationCollection
A strategy method allowing derived classes such as PredicateAggregationCollection to check to see if the aggregation has completed

Specified by:
onAggregation in interface AggregationCollection
Overrides:
onAggregation in class DefaultAggregationCollection

iterator

public Iterator<Exchange> iterator()
Description copied from interface: AggregationCollection
Gets the iterator to iterate this collection.

Specified by:
iterator in interface Iterable<Exchange>
Specified by:
iterator in interface Collection<Exchange>
Specified by:
iterator in interface AggregationCollection
Overrides:
iterator in class DefaultAggregationCollection

size

public int size()
Description copied from interface: AggregationCollection
Gets the size of this collection

Specified by:
size in interface Collection<Exchange>
Specified by:
size in interface AggregationCollection
Overrides:
size in class DefaultAggregationCollection

clear

public void clear()
Description copied from interface: AggregationCollection
Clears this collection

Specified by:
clear in interface Collection<Exchange>
Specified by:
clear in interface AggregationCollection
Overrides:
clear in class DefaultAggregationCollection


Apache CAMEL