Clover coverage report - JFox Service-Oriented Application Framework - 1.0-M2
Coverage timestamp: 星期四 十一月 25 2004 17:14:11 PST
file stats: LOC: 52   Methods: 1
NCLOC: 21   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
MBeanServerInterceptor.java 100% 100% 100% 100%
coverage
 1   
 /**
 2   
  * JFoxSOAF, Service-Oriented Application Framework
 3   
  * 
 4   
  * Copyright (C) www.huihoo.org
 5   
  * 
 6   
  * Distributable under GNU LGPL For more information, please visit:
 7   
  * http://www.huihoo.org/jfox/jfoxsoaf
 8   
  */
 9   
 
 10   
 package org.huihoo.jfox.soaf.container;
 11   
 
 12   
 import org.apache.commons.lang.BooleanUtils;
 13   
 import org.apache.commons.logging.Log;
 14   
 import org.apache.commons.logging.LogFactory;
 15   
 import org.huihoo.jfox.soaf.util.resource.ResourceHelper;
 16   
 
 17   
 /**
 18   
  * MBeanServerInterceptor intercept manageable service request and regist
 19   
  * service instance to a MBeanServer and ServiceContainer.
 20   
  * 
 21   
  * @author <a href="mailto:founder_chen@yahoo.com.cn">Peter Cheng </a>
 22   
  * @version $Revision: 1.9 $ $Date: 2004/10/28 11:09:45 $
 23   
  * @version Revision: 1.0
 24   
  */
 25   
 
 26   
 public class MBeanServerInterceptor implements ServiceInterceptor {
 27   
 
 28   
     private final Log logger = LogFactory.getLog(getClass());
 29   
 
 30   
     private ManageableServiceContainer manageableServiceContainer = ManageableServiceContainer
 31   
             .getInstance();
 32   
 
 33   
     /**
 34   
      * Interceptor invoke.
 35   
      * 
 36   
      * @see org.huihoo.jfox.soaf.container.ServiceInterceptor#invoke(org.huihoo.jfox.soaf.container.ServiceEntry)
 37   
      */
 38  15
     public void invoke(ServiceEntry serviceEntry) throws Throwable {
 39   
 
 40  15
         if (BooleanUtils.toBoolean(serviceEntry.getManageable())) {
 41  1
             logger.info("Register Managable Service : "
 42   
                     + serviceEntry.getImplementation());
 43  1
             Object object = ResourceHelper.instantiate(serviceEntry
 44   
                     .getImplementation());
 45  1
             synchronized (manageableServiceContainer) {
 46  1
                 manageableServiceContainer.registManagebleService(object,
 47   
                         serviceEntry);
 48   
             }
 49   
         }
 50   
     }
 51   
 
 52   
 }