Coverage Report - org.mule.providers.soap.axis.extensions.MuleConfigProvider
 
Classes in this File Line Coverage Branch Coverage Complexity
MuleConfigProvider
47%
8/17
0%
0/4
1.5
 
 1  
 /*
 2  
  * $Id: MuleConfigProvider.java 7963 2007-08-21 08:53:15Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.providers.soap.axis.extensions;
 12  
 
 13  
 import java.util.ArrayList;
 14  
 import java.util.Iterator;
 15  
 import java.util.List;
 16  
 
 17  
 import org.apache.axis.AxisEngine;
 18  
 import org.apache.axis.ConfigurationException;
 19  
 import org.apache.axis.EngineConfiguration;
 20  
 import org.apache.axis.configuration.SimpleProvider;
 21  
 
 22  
 /**
 23  
  * <code>MuleConfigProvider</code> is needed because the Simple Provider does not
 24  
  * list services in the defaultConfiguration.
 25  
  */
 26  
 public class MuleConfigProvider extends SimpleProvider
 27  
 {
 28  
     private EngineConfiguration engineConfiguration;
 29  
 
 30  
     public MuleConfigProvider(EngineConfiguration engineConfiguration)
 31  
     {
 32  100
         super(engineConfiguration);
 33  100
         this.engineConfiguration = engineConfiguration;
 34  100
     }
 35  
 
 36  
     /**
 37  
      * Configure an AxisEngine. Right now just calls the default configuration if
 38  
      * there is one, since we don't do anything special.
 39  
      */
 40  
     public void configureEngine(AxisEngine engine) throws ConfigurationException
 41  
     {
 42  180
         synchronized (this)
 43  
         {
 44  180
             engineConfiguration.configureEngine(engine);
 45  180
             super.configureEngine(engine);
 46  180
         }
 47  180
     }
 48  
 
 49  
     public Iterator getAxisDeployedServices() throws ConfigurationException
 50  
     {
 51  0
         return engineConfiguration.getDeployedServices();
 52  
     }
 53  
 
 54  
     public Iterator getAllDeployedServices() throws ConfigurationException
 55  
     {
 56  0
         List services = new ArrayList();
 57  0
         Iterator iter = engineConfiguration.getDeployedServices();
 58  0
         while (iter.hasNext())
 59  
         {
 60  0
             services.add(iter.next());
 61  
         }
 62  0
         iter = super.getDeployedServices();
 63  0
         while (iter.hasNext())
 64  
         {
 65  0
             services.add(iter.next());
 66  
         }
 67  0
         return services.iterator();
 68  
     }
 69  
 }