Coverage Report - org.mule.transport.soap.axis.extensions.MuleConfigProvider
 
Classes in this File Line Coverage Branch Coverage Complexity
MuleConfigProvider
0%
0/17
0%
0/4
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.transport.soap.axis.extensions;
 8  
 
 9  
 import java.util.ArrayList;
 10  
 import java.util.Iterator;
 11  
 import java.util.List;
 12  
 
 13  
 import org.apache.axis.AxisEngine;
 14  
 import org.apache.axis.ConfigurationException;
 15  
 import org.apache.axis.EngineConfiguration;
 16  
 import org.apache.axis.configuration.SimpleProvider;
 17  
 
 18  
 /**
 19  
  * <code>MuleConfigProvider</code> is needed because the Simple Provider does not
 20  
  * list services in the defaultConfiguration.
 21  
  */
 22  
 public class MuleConfigProvider extends SimpleProvider
 23  
 {
 24  
     private EngineConfiguration engineConfiguration;
 25  
 
 26  
     public MuleConfigProvider(EngineConfiguration engineConfiguration)
 27  
     {
 28  0
         super(engineConfiguration);
 29  0
         this.engineConfiguration = engineConfiguration;
 30  0
     }
 31  
 
 32  
     /**
 33  
      * Configure an AxisEngine. Right now just calls the default configuration if
 34  
      * there is one, since we don't do anything special.
 35  
      */
 36  
     public void configureEngine(AxisEngine engine) throws ConfigurationException
 37  
     {
 38  0
         synchronized (this)
 39  
         {
 40  0
             engineConfiguration.configureEngine(engine);
 41  0
             super.configureEngine(engine);
 42  0
         }
 43  0
     }
 44  
 
 45  
     public Iterator getAxisDeployedServices() throws ConfigurationException
 46  
     {
 47  0
         return engineConfiguration.getDeployedServices();
 48  
     }
 49  
 
 50  
     public Iterator getAllDeployedServices() throws ConfigurationException
 51  
     {
 52  0
         List services = new ArrayList();
 53  0
         Iterator iter = engineConfiguration.getDeployedServices();
 54  0
         while (iter.hasNext())
 55  
         {
 56  0
             services.add(iter.next());
 57  
         }
 58  0
         iter = super.getDeployedServices();
 59  0
         while (iter.hasNext())
 60  
         {
 61  0
             services.add(iter.next());
 62  
         }
 63  0
         return services.iterator();
 64  
     }
 65  
 }