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