org.mule.routing
Class DefaultRouterResultsHandler

java.lang.Object
  extended by org.mule.routing.DefaultRouterResultsHandler
All Implemented Interfaces:
RouterResultsHandler

public class DefaultRouterResultsHandler
extends Object
implements RouterResultsHandler

The default results handler for all outbound endpoint. Depending on the number of messages passed it the returning message will be different. If the 'results' param is null or empty, null is returned. If the 'results' param contains a single MuleMessage, than that message is returned. If the 'results' param contains more than one message a MuleMessageCollection instance is returned.

Note that right now (as of Mule 2.0.1) this SPI is not pluggable and this implementation is the default and only implementation.

See Also:
MuleMessageCollection, MuleMessage, DefaultMessageCollection

Constructor Summary
DefaultRouterResultsHandler()
           
DefaultRouterResultsHandler(boolean returnCollectionWithSingleResult)
           
 
Method Summary
 MuleEvent aggregateResults(List<MuleEvent> results, MuleEvent previous, MuleContext muleContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRouterResultsHandler

public DefaultRouterResultsHandler()

DefaultRouterResultsHandler

public DefaultRouterResultsHandler(boolean returnCollectionWithSingleResult)
Parameters:
returnCollectionWithSingleResult - if a MuleMessageCollection should be return despite there's only one result event
Method Detail

aggregateResults

public MuleEvent aggregateResults(List<MuleEvent> results,
                                  MuleEvent previous,
                                  MuleContext muleContext)
Specified by:
aggregateResults in interface RouterResultsHandler


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