You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by he...@apache.org on 2005/05/09 12:45:42 UTC
svn commit: r169273 - in
/webservices/axis/trunk/java/modules/core/src/org/apache/axis:
clientapi/MEPClient.java context/EngineContext.java engine/AxisSystem.java
engine/AxisSystemImpl.java
Author: hemapani
Date: Mon May 9 03:45:39 2005
New Revision: 169273
URL: http://svn.apache.org/viewcvs?rev=169273&view=rev
Log:
refactor the EngineConfiguration->AxisSystem and EngineContext->SystemContext
Added:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystem.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java
Removed:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java
Modified:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java?rev=169273&r1=169272&r2=169273&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java Mon May 9 03:45:39 2005
@@ -17,9 +17,7 @@
*/
package org.apache.axis.clientapi;
-import org.apache.axis.context.SystemContext;
-import org.apache.axis.description.AxisOperation;
-import org.apache.axis.description.AxisService;
+import org.apache.axis.context.ServiceContext;
/**
* @author hemapani
@@ -28,7 +26,6 @@
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class MEPClient {
- private AxisService service;
- private AxisOperation axisOperation;
- private SystemContext engineContext;
+ private ServiceContext service;
+
}
Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystem.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystem.java?rev=169273&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystem.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystem.java Mon May 9 03:45:39 2005
@@ -0,0 +1,137 @@
+/*
+ * 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;
+
+/**
+ * The palce where all the Global states of Axis is kept.
+ * All the Global states kept in the <code>EngineRegistry</code> and all the
+ * Service states kept in the <code>MessageContext</code>. Other runtime
+ * artifacts does not keep states foward from the execution.
+ */
+public interface AxisSystem {
+ /**
+ * Field INFLOW
+ */
+ public static final int INFLOW = 10003;
+
+ /**
+ * Field OUTFLOW
+ */
+ public static final int OUTFLOW = 10004;
+
+ /**
+ * Field FAULT_IN_FLOW
+ */
+ public static final int FAULT_IN_FLOW = 10005;
+
+ public static final int FAULT_OUT_FLOW = 10006;
+
+ /**
+ * Method getGlobal
+ *
+ * @return
+ * @throws AxisFault
+ */
+ public AxisGlobal getGlobal() throws AxisFault;
+
+ /**
+ * Method getService
+ *
+ * @param name
+ * @return
+ * @throws AxisFault
+ */
+ public AxisService getService(QName name) throws AxisFault;
+
+ /**
+ * Method addService
+ *
+ * @param service
+ * @throws AxisFault
+ */
+ public void addService(AxisService service) throws AxisFault;
+
+ /**
+ * Method removeService
+ *
+ * @param name
+ * @throws AxisFault
+ */
+ public void removeService(QName name) throws AxisFault;
+
+ /**
+ * Modules is read only as they can not deployed while runing
+ *
+ * @param name
+ * @return
+ * @throws AxisFault
+ */
+ public AxisModule getModule(QName name) throws AxisFault;
+
+ /**
+ * Method addMdoule
+ *
+ * @param module
+ * @throws AxisFault
+ */
+ public void addMdoule(AxisModule module) throws AxisFault;
+
+
+ /**
+ * Method getTransports
+ *
+ * @return
+ * @throws AxisFault
+ */
+ public HashMap getTransports() throws AxisFault;
+
+
+ public ArrayList getInPhases();
+ public ArrayList getOutPhases();
+ public ArrayList getInFaultPhases() ;
+ public ArrayList getOutFaultPhases();
+
+ /**
+ * Method getServices
+ *
+ * @return
+ */
+ public HashMap getServices();
+
+ public Hashtable getFaulytServices();
+
+
+ public AxisTransportIn getTransportIn(QName name) throws AxisFault ;
+ public void addTransportIn(AxisTransportIn transport) throws AxisFault;
+ public AxisTransportOut getTransportOut(QName name) throws AxisFault ;
+ public void addTransportOut(AxisTransportOut transport) throws AxisFault ;
+ public HashMap getTransportsIn();
+ public HashMap getTransportsOut();
+
+ ArrayList getFaultPhases();
+}
Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java?rev=169273&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java Mon May 9 03:45:39 2005
@@ -0,0 +1,269 @@
+/*
+* 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 AxisSystemImpl implements AxisSystem {
+ /**
+ * 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 AxisSystemImpl(AxisGlobal global) {
+ 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);
+ }
+
+ /**
+ *
+ * @return
+ */
+ public HashMap getModules(){
+ return modules;
+ }
+
+
+ /**
+ * 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;
+ }
+
+ public ArrayList getFaultPhases() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ /**
+ * 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;
+ }
+
+}