Coverage Report - org.mule.example.loanbroker.routers.BankQuotesResponseAggregator
 
Classes in this File Line Coverage Branch Coverage Complexity
BankQuotesResponseAggregator
0%
0/2
N/A
0
BankQuotesResponseAggregator$1
0%
0/4
N/A
0
 
 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.example.loanbroker.routers;
 8  
 
 9  
 import org.mule.api.MuleContext;
 10  
 import org.mule.api.MuleEvent;
 11  
 import org.mule.routing.AbstractAggregator;
 12  
 import org.mule.routing.AggregationException;
 13  
 import org.mule.routing.EventGroup;
 14  
 import org.mule.routing.correlation.CollectionCorrelatorCallback;
 15  
 import org.mule.routing.correlation.EventCorrelatorCallback;
 16  
 
 17  
 /**
 18  
  * <code>BankQuotesInboundAggregator</code> receives a number of quotes and selects the
 19  
  * lowest
 20  
  */
 21  0
 public class BankQuotesResponseAggregator extends AbstractAggregator
 22  
 {
 23  
     @Override
 24  
     protected EventCorrelatorCallback getCorrelatorCallback(MuleContext muleContext)
 25  
     {
 26  0
         return new CollectionCorrelatorCallback(muleContext)
 27  0
         {
 28  
             @Override
 29  
             public MuleEvent aggregateEvents(EventGroup events) throws AggregationException
 30  
             {
 31  
                 try
 32  
                 {
 33  0
                     return BankQuotesAggregationLogic.aggregateEvents(events);
 34  
                 }
 35  0
                 catch (Exception e)
 36  
                 {
 37  0
                     throw new AggregationException(events, null, e);
 38  
                 }
 39  
             }
 40  
         };
 41  
     }
 42  
 }