org.mule.routing.response
Class ResponseCorrelationAggregator.DefaultEventCorrelatorCallback
java.lang.Object
org.mule.routing.response.ResponseCorrelationAggregator.DefaultEventCorrelatorCallback
- All Implemented Interfaces:
- EventCorrelatorCallback
- Enclosing class:
- ResponseCorrelationAggregator
public class ResponseCorrelationAggregator.DefaultEventCorrelatorCallback
- extends Object
- implements EventCorrelatorCallback
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResponseCorrelationAggregator.DefaultEventCorrelatorCallback
public ResponseCorrelationAggregator.DefaultEventCorrelatorCallback()
aggregateEvents
public MuleMessage 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 interface EventCorrelatorCallback
- 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 component
RoutingException
shouldAggregateEvents
public 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 interface EventCorrelatorCallback
- Parameters:
events
-
- Returns:
- true if the event group is ready of aggregation
createEventGroup
public EventGroup createEventGroup(MuleEvent event,
Object id)
- Description copied from interface:
EventCorrelatorCallback
- Creates the event group with a specific correlation size based on the Mule
Correlation support
- Specified by:
createEventGroup
in interface EventCorrelatorCallback
- Parameters:
event
- the current eventid
- The group id
- Returns:
- a new event group of a fixed size
Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.