org.mule.routing.inbound
Class CorrelationAggregator

java.lang.Object
  extended byorg.mule.routing.inbound.SelectiveConsumer
      extended byorg.mule.routing.inbound.AbstractEventAggregator
          extended byorg.mule.routing.inbound.CorrelationAggregator
All Implemented Interfaces:
UMOInboundRouter, UMORouter

public abstract class CorrelationAggregator
extends AbstractEventAggregator

CorrelationAggregator Uses the CorrelationID and CorrelationGroupSize properties of the UMOMessage to manage message groups.

Version:
$Revision: 1.1.1.1 $
Author:
Ross Mason

Field Summary
 
Fields inherited from class org.mule.routing.inbound.AbstractEventAggregator
eventGroups, NO_CORRELATION_ID
 
Fields inherited from class org.mule.routing.inbound.SelectiveConsumer
logger
 
Constructor Summary
CorrelationAggregator()
           
 
Method Summary
protected  EventGroup addEvent(UMOEvent event)
          Adds the event to an event group.
protected  boolean shouldAggregate(EventGroup events)
          Determines if the event group is ready to be aggregated.
 
Methods inherited from class org.mule.routing.inbound.AbstractEventAggregator
aggregateEvents, process, removeGroup
 
Methods inherited from class org.mule.routing.inbound.SelectiveConsumer
getFilter, getRouterStatistics, isMatch, isTransformFirst, setFilter, setRouterStatistics, setTransformFirst
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CorrelationAggregator

public CorrelationAggregator()
Method Detail

shouldAggregate

protected boolean shouldAggregate(EventGroup events)
Determines if the event group is ready to be aggregated. if the group is ready to be aggregated (this is entirely up to the application. it could be determined by volume, last modified time or some oher criteria based on the last event received)

Specified by:
shouldAggregate in class AbstractEventAggregator
Parameters:
events -
Returns:

addEvent

protected EventGroup addEvent(UMOEvent event)
Adds the event to an event group. Groups are defined by the correlationId on the message. If no correlationId is set a default group is created for all events without a correlationId. If there is no group for the current correlationId one will be created and added to the router.

Overrides:
addEvent in class AbstractEventAggregator
Parameters:
event -
Returns:


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.