org.mule.routing.response
Class ResponseCorrelationAggregator

java.lang.Object
  extended byorg.mule.routing.response.AbstractResponseRouter
      extended byorg.mule.routing.response.AbstractResponseAggregator
          extended byorg.mule.routing.response.ResponseCorrelationAggregator
All Implemented Interfaces:
UMOResponseRouter, UMORouter

public abstract class ResponseCorrelationAggregator
extends AbstractResponseAggregator

ResponseCorrelationAggregator Correlates one or more events on a response flow using the Correlation Id to group events

Version:
$Revision: 1.1.1.1 $
Author:
Ross Mason

Field Summary
 
Fields inherited from class org.mule.routing.response.AbstractResponseAggregator
eventGroups, logger, NO_CORRELATION_ID, timeout
 
Constructor Summary
ResponseCorrelationAggregator()
           
 
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.response.AbstractResponseAggregator
aggregateEvents, getResponse, getTimeout, process, removeGroup, setTimeout
 
Methods inherited from class org.mule.routing.response.AbstractResponseRouter
getRouterStatistics, setRouterStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseCorrelationAggregator

public ResponseCorrelationAggregator()
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 AbstractResponseAggregator
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 AbstractResponseAggregator
Parameters:
event -
Returns:


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