org.apache.camel.processor.aggregate
Interface AggregationCollection

All Superinterfaces:
Collection<Exchange>, Iterable<Exchange>
All Known Implementing Classes:
DefaultAggregationCollection, PredicateAggregationCollection

public interface AggregationCollection
extends Collection<Exchange>

A Collection which aggregates exchanges together, using a correlation Expression and a AggregationStrategy.

The Default Implementation will group messages based on the correlation expression. Other implementations could for instance just add all exchanges as a batch.

Version:
$Revision: 723844 $

Method Summary
 boolean add(Exchange exchange)
          Adds the given exchange to this collection
 void clear()
          Clears this collection
 AggregationStrategy getAggregationStrategy()
          Gets the aggregation strategy
 Expression getCorrelationExpression()
          Gets the correlation expression
 Iterator<Exchange> iterator()
          Gets the iterator to iterate this collection.
 void onAggregation(Object correlationKey, Exchange newExchange)
          A strategy method allowing derived classes such as PredicateAggregationCollection to check to see if the aggregation has completed
 void setAggregationStrategy(AggregationStrategy aggregationStrategy)
          Sets the aggregation strategy to be used
 void setCorrelationExpression(Expression correlationExpression)
          Sets the correlation expression to be used
 int size()
          Gets the size of this collection
 
Methods inherited from interface java.util.Collection
addAll, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Method Detail

getCorrelationExpression

Expression getCorrelationExpression()
Gets the correlation expression


setCorrelationExpression

void setCorrelationExpression(Expression correlationExpression)
Sets the correlation expression to be used


getAggregationStrategy

AggregationStrategy getAggregationStrategy()
Gets the aggregation strategy


setAggregationStrategy

void setAggregationStrategy(AggregationStrategy aggregationStrategy)
Sets the aggregation strategy to be used


add

boolean add(Exchange exchange)
Adds the given exchange to this collection

Specified by:
add in interface Collection<Exchange>

iterator

Iterator<Exchange> iterator()
Gets the iterator to iterate this collection.

Specified by:
iterator in interface Collection<Exchange>
Specified by:
iterator in interface Iterable<Exchange>

size

int size()
Gets the size of this collection

Specified by:
size in interface Collection<Exchange>

clear

void clear()
Clears this collection

Specified by:
clear in interface Collection<Exchange>

onAggregation

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



Apache CAMEL