org.mule.routing.correlation
Class ResequenceMessagesCorrelatorCallback

java.lang.Object
  extended by org.mule.routing.correlation.CollectionCorrelatorCallback
      extended by org.mule.routing.correlation.ResequenceMessagesCorrelatorCallback
All Implemented Interfaces:
EventCorrelatorCallback

public class ResequenceMessagesCorrelatorCallback
extends CollectionCorrelatorCallback

A Correlator that correlates messages based on Mule correlation settings Note that the aggregateEvents(org.mule.routing.EventGroup) method only resequences the events and returns an MuleEvent[] wrapped in a MuleMessage impl. This means that this callback can ONLY be used with a Resequencer


Field Summary
protected  Comparator eventComparator
           
protected  MuleContext muleContext
           
 
Fields inherited from class org.mule.routing.correlation.CollectionCorrelatorCallback
logger
 
Constructor Summary
ResequenceMessagesCorrelatorCallback(Comparator eventComparator, MuleContext muleContext, boolean persistantStore, String storePrefix)
           
 
Method Summary
 MuleEvent aggregateEvents(EventGroup events)
          This method is invoked if the shouldAggregate method is called and returns true.
 
Methods inherited from class org.mule.routing.correlation.CollectionCorrelatorCallback
createEventGroup, getMergedSession, shouldAggregateEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eventComparator

protected Comparator eventComparator

muleContext

protected MuleContext muleContext
Constructor Detail

ResequenceMessagesCorrelatorCallback

public ResequenceMessagesCorrelatorCallback(Comparator eventComparator,
                                            MuleContext muleContext,
                                            boolean persistantStore,
                                            String storePrefix)
Method Detail

aggregateEvents

public MuleEvent 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 interface EventCorrelatorCallback
Overrides:
aggregateEvents in class CollectionCorrelatorCallback
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


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.