org.mule.examples.loanbroker.routers
Class BankQuotesResponseAggregator

java.lang.Object
  extended by org.mule.routing.AbstractRouter
      extended by org.mule.routing.response.AbstractResponseRouter
          extended by org.mule.routing.response.AbstractResponseAggregator
              extended by org.mule.routing.response.ResponseCorrelationAggregator
                  extended by org.mule.examples.loanbroker.routers.BankQuotesResponseAggregator
All Implemented Interfaces:
UMOResponseRouter, UMORouter

public class BankQuotesResponseAggregator
extends ResponseCorrelationAggregator

BankQuotesInboundAggregator receives a number of quotes and selects the lowest


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
BankQuotesResponseAggregator()
           
 
Method Summary
protected  UMOMessage aggregateEvents(EventGroup events)
          This method is invoked if the shouldAggregate method is called and returns true.
 
Methods inherited from class org.mule.routing.response.ResponseCorrelationAggregator
createEventGroup, shouldAggregateEvents
 
Methods inherited from class org.mule.routing.response.AbstractResponseAggregator
addEventGroup, 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

BankQuotesResponseAggregator

public BankQuotesResponseAggregator()
Method Detail

aggregateEvents

protected UMOMessage aggregateEvents(EventGroup events)
                              throws RoutingException
This method is invoked if the shouldAggregate method is called and returns true. Once this method returns an aggregated message the event group is removed from the router

Specified by:
aggregateEvents in class AbstractResponseAggregator
Parameters:
events - the event group for this request
Returns:
an aggregated message
Throws:
RoutingException - if the aggregation fails. in this scenario the whole event group is removed and passed to the exception handler for this componenet
See Also:
AbstractEventAggregator.aggregateEvents(EventGroup)


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