org.mule.routing.response
Class ResponseCorrelationAggregator

java.lang.Object
  extended byorg.mule.routing.AbstractRouter
      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, 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, locks, responseMessages
 
Fields inherited from class org.mule.routing.response.AbstractResponseRouter
correlationExtractor, logger
 
Constructor Summary
ResponseCorrelationAggregator()
           
 
Method Summary
protected  EventGroup createEventGroup(UMOEvent event, Object id)
          Creates the event group with a specific correlation size based on the Mule Correlation support
protected  boolean shouldAggregateEvents(EventGroup events)
          Determines if the event group is ready to be aggregated.
 
Methods inherited from class org.mule.routing.response.AbstractResponseAggregator
addEventGroup, aggregateEvents, getEventGroup, getResponse, process, removeEventGroup
 
Methods inherited from class org.mule.routing.response.AbstractResponseRouter
getCallResponseAggregateIdentifier, getCorrelationExtractor, getReplyAggregateIdentifier, getTimeout, isFailOnTimeout, setCorrelationExtractor, setFailOnTimeout, setPropertyExtractorAsString, setTimeout
 
Methods inherited from class org.mule.routing.AbstractRouter
getRouterStatistics, setRouterStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.umo.routing.UMORouter
getRouterStatistics, setRouterStatistics
 

Constructor Detail

ResponseCorrelationAggregator

public ResponseCorrelationAggregator()
Method Detail

shouldAggregateEvents

protected boolean shouldAggregateEvents(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:
shouldAggregateEvents in class AbstractResponseAggregator
Parameters:
events -
Returns:
true if the event group is ready of aggregation
See Also:
AbstractEventAggregator.shouldAggregateEvents(EventGroup)

createEventGroup

protected EventGroup createEventGroup(UMOEvent event,
                                      Object id)
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
See Also:
AbstractEventAggregator.createEventGroup(UMOEvent, Object)


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.