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
Direct Known Subclasses:
BankQuotesResponseAggregator, BankQuotesResponseAggregator, DummyResponseAggregator, PaymentValidationResponseAggregator, TestResponseAggregator

public abstract class ResponseCorrelationAggregator
extends AbstractResponseAggregator

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


Field Summary
 
Fields inherited from class org.mule.routing.response.AbstractResponseAggregator
eventGroups, responseEvents
 
Fields inherited from class org.mule.routing.response.AbstractResponseRouter
correlationExtractor, logger
 
Constructor Summary
ResponseCorrelationAggregator()
           
 
Method Summary
protected  EventGroup createEventGroup(Object id, UMOEvent event)
          Creates the event group with a specific correlation size based on the Mule Correlation support
protected  boolean shouldAggregate(EventGroup events)
          Determines if the event group is ready to be aggregated.
 
Methods inherited from class org.mule.routing.response.AbstractResponseAggregator
addEvent, aggregateEvents, getResponse, process, removeEventGroup
 
Methods inherited from class org.mule.routing.response.AbstractResponseRouter
getCallResponseAggregateIdentifier, getCorrelationExtractor, getReplyAggregateIdentifier, getRouterStatistics, getTimeout, setCorrelationExtractor, setPropertyExtractorAsString, setRouterStatistics, setTimeout
 
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:
true if the event group is ready of aggregation

createEventGroup

protected EventGroup createEventGroup(Object id,
                                      UMOEvent event)
Creates the event group with a specific correlation size based on the Mule Correlation support

Overrides:
createEventGroup in class AbstractResponseAggregator
Parameters:
id - The group id
event - the current event
Returns:
a new event group of a fixed size


Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.