Coverage Report - org.mule.tck.testmodels.services.TestReceiver
 
Classes in this File Line Coverage Branch Coverage Complexity
TestReceiver
0%
0/8
0%
0/2
1.5
 
 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.tck.testmodels.services;
 8  
 
 9  
 import org.mule.RequestContext;
 10  
 import org.mule.util.StringMessageUtils;
 11  
 
 12  
 import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger;
 13  
 import org.apache.commons.logging.Log;
 14  
 import org.apache.commons.logging.LogFactory;
 15  
 
 16  0
 public class TestReceiver
 17  
 {
 18  0
     protected static final Log logger = LogFactory.getLog(TestComponent.class);
 19  
 
 20  0
     protected AtomicInteger count = new AtomicInteger(0);
 21  
 
 22  
     public String receive(String message) throws Exception
 23  
     {
 24  0
         if (logger.isDebugEnabled())
 25  
         {
 26  0
             logger.debug(StringMessageUtils.getBoilerPlate("Received: " + message + " Number: " + inc()
 27  
                                                            + " in thread: "
 28  
                                                            + Thread.currentThread().getName()));
 29  0
             logger.debug("Message ID is: " + RequestContext.getEventContext().getMessage().getCorrelationId());
 30  
         }
 31  
 
 32  0
         return "Received: " + message;
 33  
     }
 34  
 
 35  
     protected int inc()
 36  
     {
 37  0
         return count.incrementAndGet();
 38  
     }
 39  
 
 40  
 }