org.apache.camel.processor.aggregate
Class PredicateAggregationCollection

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

public class PredicateAggregationCollection
extends AggregationCollection

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

Version:
$Revision: 36321 $

Constructor Summary
PredicateAggregationCollection(Expression<Exchange> correlationExpression, AggregationStrategy aggregationStrategy, Predicate aggregationCompletedPredicate)
           
 
Method Summary
 void clear()
           
 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 org.apache.camel.processor.aggregate.AggregationCollection
add, getMap
 
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

PredicateAggregationCollection

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

onAggregation

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

Overrides:
onAggregation in class AggregationCollection

iterator

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

size

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

clear

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


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