Clover coverage report - Ivory - 1.0-alpha-5
Coverage timestamp: Sun Nov 9 2003 22:02:40 EST
file stats: LOC: 70   Methods: 4
NCLOC: 40   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
PlexusAdminServlet.java 0% 0% 0% 0%
coverage
 1   
 package org.codehaus.ivory.plexus;
 2   
 
 3   
 import org.apache.avalon.framework.service.ServiceException;
 4   
 import org.apache.avalon.framework.service.ServiceManager;
 5   
 import org.apache.axis.AxisFault;
 6   
 import org.apache.axis.server.AxisServer;
 7   
 import org.apache.axis.transport.http.AdminServlet;
 8   
 import org.codehaus.ivory.AxisService;
 9   
 import org.codehaus.plexus.servlet.PlexusServletUtils;
 10   
 
 11   
 /**
 12   
  * An implementation of the Axis AdminServlet which retrieves the AxisEngine
 13   
  * from the ServiceManager.
 14   
  * 
 15   
  * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
 16   
  * @since Mar 8, 2003
 17   
  */
 18   
 public class PlexusAdminServlet 
 19   
     extends AdminServlet
 20   
 {
 21   
     ServiceManager manager;
 22   
     
 23   
     AxisService axisService;
 24   
     
 25  0
     public PlexusAdminServlet()
 26   
     {
 27   
     }
 28   
     
 29   
     /**
 30   
      * Provide the AxisEngine to the base servlet class.
 31   
      * 
 32   
      * @return AxisServer
 33   
      * @see org.apache.axis.transport.http.AxisServletBase#getEngine()
 34   
      */
 35  0
     public AxisServer getEngine() throws AxisFault
 36   
     {
 37  0
         manager = getServiceManager();
 38   
                 
 39  0
         try
 40   
         {
 41  0
             axisService = ( AxisService ) manager.lookup( AxisService.ROLE );
 42   
         }
 43   
         catch (ServiceException e)
 44   
         {
 45  0
             throw new AxisFault( "Could not find the AxisService.", e );
 46   
         }
 47   
         
 48  0
         return axisService.getAxisServer();
 49   
     }
 50   
     
 51   
     /**
 52   
      * Retrieve the ServiceBroker from the ServletContext.  This presupposes
 53   
      * that the installation is using Plexus.
 54   
      * 
 55   
      * @return ServiceBroker
 56   
      */
 57  0
     public ServiceManager getServiceManager()
 58   
     {
 59  0
         return PlexusServletUtils.getServiceManager( getServletContext() );
 60   
     }
 61   
     
 62  0
     public void destroy()
 63   
     {
 64  0
         super.destroy();
 65   
         
 66  0
         if ( axisService != null )
 67  0
             manager.release( axisService );
 68   
     }
 69   
 }
 70