View Javadoc

1   /*
2    * $Id: SimpleCollectionAggregator.java 22506 2011-07-21 16:30:40Z stephen.fenech $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.routing;
12  
13  import org.mule.api.MuleContext;
14  import org.mule.routing.correlation.CollectionCorrelatorCallback;
15  import org.mule.routing.correlation.EventCorrelatorCallback;
16  
17  /**
18   * This router will return all aggregated events as a
19   * {@link org.mule.api.MuleMessageCollection}. This allows the service itself to act
20   * upon the events rather that the user having to write a custom aggregator. This may
21   * feel more natural for some users. <b>EIP Reference:</b> <a
22   * href="http://www.eaipatterns.com/Aggregator.html"
23   * >http://www.eaipatterns.com/Aggregator.html</a>
24   */
25  public class SimpleCollectionAggregator extends AbstractAggregator
26  {
27      @Override
28      protected EventCorrelatorCallback getCorrelatorCallback(MuleContext muleContext)
29      {
30          return new CollectionCorrelatorCallback(muleContext, persistentStores, storePrefix);
31      }
32  }