You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by he...@apache.org on 2005/04/11 12:40:26 UTC
svn commit: r160856 - in webservices/axis/trunk/java/modules/core:
src/org/apache/axis/clientapi/ src/org/apache/axis/deployment/
src/org/apache/axis/engine/ src/org/apache/axis/providers/
test/org/apache/axis/description/ test/org/apache/axis/engine/
Author: hemapani
Date: Mon Apr 11 03:40:22 2005
New Revision: 160856
URL: http://svn.apache.org/viewcvs?view=rev&rev=160856
Log:
first refactroing according to the summit f2f decisions, building up context and engine
Added:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineConfigurationImpl.java
Removed:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineRegistryImpl.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Provider.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Receiver.java
Modified:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/providers/AbstractProvider.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/description/RegistryTest.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineTest.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java?view=diff&r1=160855&r2=160856
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java Mon Apr 11 03:40:22 2005
@@ -29,7 +29,7 @@
import org.apache.axis.engine.AxisEngine;
import org.apache.axis.engine.AxisFault;
import org.apache.axis.engine.EngineConfiguration;
-import org.apache.axis.engine.EngineRegistryImpl;
+import org.apache.axis.engine.EngineConfigurationImpl;
import org.apache.axis.om.OMException;
import org.apache.axis.om.SOAPEnvelope;
import org.apache.axis.transport.TransportReceiver;
@@ -85,7 +85,7 @@
*/
public Call() throws AxisFault {
// TODO look for the Client XML and create an Engine registy
- this.registry = new EngineRegistryImpl(new AxisGlobal());
+ this.registry = new EngineConfigurationImpl(new AxisGlobal());
try {
//This is a hack, initialize the transports for the client side
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java?view=diff&r1=160855&r2=160856
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java Mon Apr 11 03:40:22 2005
@@ -252,7 +252,7 @@
EngineConfiguration newEngineRegisty;
server = new AxisGlobal();
- newEngineRegisty = new EngineRegistryImpl(server);
+ newEngineRegisty = new EngineConfigurationImpl(server);
return newEngineRegisty;
}
Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineConfigurationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineConfigurationImpl.java?view=auto&rev=160856
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineConfigurationImpl.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineConfigurationImpl.java Mon Apr 11 03:40:22 2005
@@ -0,0 +1,256 @@
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.axis.engine;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Hashtable;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.description.AxisGlobal;
+import org.apache.axis.description.AxisModule;
+import org.apache.axis.description.AxisService;
+import org.apache.axis.description.AxisTransportIn;
+import org.apache.axis.description.AxisTransportOut;
+
+/**
+ * Class EngineRegistryImpl
+ */
+public class EngineConfigurationImpl implements EngineConfiguration {
+ /**
+ * To store Erroness services
+ */
+ private Hashtable errornesServices;
+
+ /**
+ * Field modules
+ */
+ private final HashMap modules = new HashMap();
+
+ /**
+ * Field services
+ */
+ private final HashMap services = new HashMap();
+
+ /**
+ * Field transports
+ */
+ private final HashMap transports = new HashMap();
+
+ private final HashMap transportsIn = new HashMap();
+
+ private final HashMap transportsOut = new HashMap();
+
+ /**
+ * Field global
+ */
+ private final AxisGlobal global;
+
+ /**
+ * Field phases
+ */
+ private ArrayList inPhases;
+ private ArrayList outPhases;
+ private ArrayList inFaultPhases;
+ private ArrayList outFaultPhases;
+ /**
+ * Constructor EngineRegistryImpl
+ *
+ * @param global
+ */
+ public EngineConfigurationImpl(AxisGlobal global) throws AxisFault {
+ this.global = global;
+ inPhases = new ArrayList();
+ outPhases = new ArrayList();
+ inFaultPhases = new ArrayList();
+ outFaultPhases = new ArrayList();
+ errornesServices = new Hashtable();
+ }
+
+ /**
+ * Method getServices
+ *
+ * @return
+ */
+ public HashMap getServices() {
+ return services;
+ }
+
+ public Hashtable getFaulytServices() {
+ return errornesServices;
+ }
+
+ /**
+ * Method addMdoule
+ *
+ * @param module
+ * @throws AxisFault
+ */
+ public synchronized void addMdoule(AxisModule module) throws AxisFault {
+ modules.put(module.getName(), module);
+ }
+
+ /**
+ * Method addService
+ *
+ * @param service
+ * @throws AxisFault
+ */
+ public synchronized void addService(AxisService service) throws AxisFault {
+ services.put(service.getName(), service);
+ }
+
+ /**
+ * Method getGlobal
+ *
+ * @return
+ * @throws AxisFault
+ */
+ public AxisGlobal getGlobal() throws AxisFault {
+ return global;
+ }
+
+ /**
+ * Method getModule
+ *
+ * @param name
+ * @return
+ * @throws AxisFault
+ */
+ public AxisModule getModule(QName name) throws AxisFault {
+ return (AxisModule) modules.get(name);
+ }
+
+ /**
+ * Method getService
+ *
+ * @param name
+ * @return
+ * @throws AxisFault
+ */
+ public AxisService getService(QName name) throws AxisFault {
+ return (AxisService) services.get(name);
+ }
+
+ /**
+ * Method removeService
+ *
+ * @param name
+ * @throws AxisFault
+ */
+ public synchronized void removeService(QName name) throws AxisFault {
+ services.remove(name);
+ }
+
+
+
+
+ public AxisTransportIn getTransportIn(QName name) throws AxisFault {
+ return (AxisTransportIn) transportsIn.get(name);
+ }
+
+ /**
+ * Method addTransport
+ *
+ * @param transport
+ * @throws AxisFault
+ */
+ public synchronized void addTransportIn(AxisTransportIn transport)
+ throws AxisFault {
+ transportsIn.put(transport.getName(), transport);
+ }
+ public AxisTransportOut getTransportOut(QName name) throws AxisFault {
+ return (AxisTransportOut) transportsOut.get(name);
+ }
+
+ /**
+ * Method addTransport
+ *
+ * @param transport
+ * @throws AxisFault
+ */
+ public synchronized void addTransportOut(AxisTransportOut transport)
+ throws AxisFault {
+ transportsOut.put(transport.getName(), transport);
+ }
+
+ public HashMap getTransportsIn() {
+ return transports;
+ }
+
+ public HashMap getTransportsOut() {
+ return transportsOut;
+ }
+
+ /**
+ * Method getTransports
+ *
+ * @return
+ * @throws AxisFault
+ */
+ public HashMap getTransports() throws AxisFault {
+ return transports;
+ }
+
+ public void setInPhases(ArrayList inPhases) {
+ this.inPhases = inPhases;
+ }
+
+ public void setOutPhases(ArrayList outPhases) {
+ this.outPhases = outPhases;
+ }
+
+
+ public ArrayList getInPhases() {
+ return inPhases;
+ }
+
+ public ArrayList getOutPhases() {
+ return outPhases;
+ }
+
+
+
+ /**
+ * @return
+ */
+ public ArrayList getInFaultPhases() {
+ return inFaultPhases;
+ }
+
+ /**
+ * @return
+ */
+ public ArrayList getOutFaultPhases() {
+ return outFaultPhases;
+ }
+
+ /**
+ * @param list
+ */
+ public void setInFaultPhases(ArrayList list) {
+ inFaultPhases = list;
+ }
+
+ /**
+ * @param list
+ */
+ public void setOutFaultPhases(ArrayList list) {
+ outFaultPhases = list;
+ }
+
+}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/providers/AbstractProvider.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/providers/AbstractProvider.java?view=diff&r1=160855&r2=160856
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/providers/AbstractProvider.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/providers/AbstractProvider.java Mon Apr 11 03:40:22 2005
@@ -16,6 +16,7 @@
package org.apache.axis.providers;
import org.apache.axis.context.MessageContext;
+import org.apache.axis.engine.MessageReceiver;
import org.apache.axis.engine.Provider;
import javax.xml.namespace.QName;
@@ -24,7 +25,7 @@
* This is the Absract provider. It is just a another handler. the
* protected abstract methods are only for the sake of breaking down the logic
*/
-public abstract class AbstractProvider implements Provider {
+public abstract class AbstractProvider implements MessageReceiver {
/**
* Field name
*/
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/description/RegistryTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/description/RegistryTest.java?view=diff&r1=160855&r2=160856
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/description/RegistryTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/description/RegistryTest.java Mon Apr 11 03:40:22 2005
@@ -22,7 +22,7 @@
import org.apache.axis.context.MessageContext;
import org.apache.axis.engine.AxisFault;
import org.apache.axis.engine.EngineConfiguration;
-import org.apache.axis.engine.EngineRegistryImpl;
+import org.apache.axis.engine.EngineConfigurationImpl;
import org.apache.axis.engine.Handler;
import org.apache.axis.handlers.AbstractHandler;
import org.apache.axis.providers.RawXMLProvider;
@@ -38,7 +38,7 @@
public void testRegistry() throws Exception {
AxisGlobal ag = new AxisGlobal();
testParameteInClude(ag);
- reg = new EngineRegistryImpl(ag);
+ reg = new EngineConfigurationImpl(ag);
QName moduleName = new QName("module1");
AxisModule modlue = new AxisModule(moduleName);
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java?view=diff&r1=160855&r2=160856
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java Mon Apr 11 03:40:22 2005
@@ -50,7 +50,7 @@
super(arg0);
}
protected void setUp() throws Exception {
- engineRegistry = new EngineRegistryImpl(new AxisGlobal());
+ engineRegistry = new EngineConfigurationImpl(new AxisGlobal());
AxisTransportOut transportOut = new AxisTransportOut(new QName("null"));
transportOut.setSender(new NullTransportSender());
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineTest.java?view=diff&r1=160855&r2=160856
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineTest.java Mon Apr 11 03:40:22 2005
@@ -50,7 +50,7 @@
super(arg0);
}
protected void setUp() throws Exception {
- engineRegistry = new EngineRegistryImpl(new AxisGlobal());
+ engineRegistry = new EngineConfigurationImpl(new AxisGlobal());
AxisTransportOut transport = new AxisTransportOut(new QName("null"));
transport.setSender(new NullTransportSender());
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java?view=diff&r1=160855&r2=160856
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java Mon Apr 11 03:40:22 2005
@@ -27,7 +27,7 @@
}
public void testMesssageContext() throws AxisFault {
- EngineConfiguration er = new EngineRegistryImpl(new AxisGlobal());
+ EngineConfiguration er = new EngineConfigurationImpl(new AxisGlobal());
MessageContext msgctx = new MessageContext(er, null,null,null,null);
msgctx.setEnvelope(OMFactory.newInstance().getDefaultEnvelope());