org.mule.samples.loanbroker.routers
Class BankQuotesAggregator
java.lang.Object
org.mule.routing.inbound.SelectiveConsumer
org.mule.routing.inbound.AbstractEventAggregator
org.mule.routing.inbound.CorrelationAggregator
org.mule.samples.loanbroker.routers.BankQuotesAggregator
- All Implemented Interfaces:
- UMOInboundRouter, UMORouter
- public class BankQuotesAggregator
- extends CorrelationAggregator
BankQuotesAggregator receives a number of quotes and selectes the
lowest
- Version:
- $Revision: 3798 $
- Author:
- Ross Mason
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BankQuotesAggregator
public BankQuotesAggregator()
aggregateEvents
protected UMOMessage aggregateEvents(EventGroup events)
throws AggregationException
- 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 AbstractEventAggregator
- Parameters:
events - the event group for this request
- Returns:
- an aggregated message
- Throws:
AggregationException - if the aggregation fails. in this scenario the
whole event group is removed and passed to the exception handler
for this componenet
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)
- Overrides:
shouldAggregate in class CorrelationAggregator
- Parameters:
events -
- Returns:
- true if the events are ready to be aggregated
Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.