KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > providers > soap > axis > extensions > MuleConfigProvider


1 /*
2  * $Id: MuleConfigProvider.java 3798 2006-11-04 04:07:14Z aperepel $
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 MuleSource MPL
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 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 import java.util.ArrayList JavaDoc;
19 import java.util.Iterator JavaDoc;
20 import java.util.List JavaDoc;
21
22 /**
23  * <code>MuleConfigProvider</code> is needed because the Simple Provider does not
24  * list services in the defaultConfiguration
25  *
26  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
27  * @version $Revision: 3798 $
28  */

29 public class MuleConfigProvider extends SimpleProvider
30 {
31     private EngineConfiguration engineConfiguration;
32
33     public MuleConfigProvider(EngineConfiguration engineConfiguration)
34     {
35         super(engineConfiguration);
36         this.engineConfiguration = engineConfiguration;
37     }
38
39     /**
40      * Configure an AxisEngine. Right now just calls the default configuration if
41      * there is one, since we don't do anything special.
42      */

43     public void configureEngine(AxisEngine engine) throws ConfigurationException
44     {
45         synchronized (this)
46         {
47             engineConfiguration.configureEngine(engine);
48             super.configureEngine(engine);
49         }
50     }
51
52     public Iterator JavaDoc getAxisDeployedServices() throws ConfigurationException
53     {
54         return engineConfiguration.getDeployedServices();
55     }
56
57     public Iterator JavaDoc getAllDeployedServices() throws ConfigurationException
58     {
59         List JavaDoc services = new ArrayList JavaDoc();
60         Iterator JavaDoc iter = engineConfiguration.getDeployedServices();
61         while (iter.hasNext())
62         {
63             services.add(iter.next());
64         }
65         iter = super.getDeployedServices();
66         while (iter.hasNext())
67         {
68             services.add(iter.next());
69         }
70         return services.iterator();
71     }
72 }
73
Popular Tags