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 de...@apache.org on 2005/05/12 15:05:53 UTC
svn commit: r169811 - in
/webservices/axis/trunk/java/modules/core/src/org/apache/axis:
engine/AxisSystemImpl.java phaseresolver/PhaseMetadata.java
phaseresolver/PhaseResolver.java phaseresolver/util/
phaseresolver/util/FlowBuilder.java
Author: deepal
Date: Thu May 12 06:05:52 2005
New Revision: 169811
URL: http://svn.apache.org/viewcvs?rev=169811&view=rev
Log:
added a util class to build default phases
Added:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/util/
webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/util/FlowBuilder.java
Modified:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseMetadata.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
Modified: 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=169811&r1=169810&r2=169811&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java Thu May 12 06:05:52 2005
@@ -30,7 +30,7 @@
/**
* Class EngineRegistryImpl
*/
-public class AxisSystemImpl implements AxisConfiguration {
+public class jAxisSystemImpl implements AxisConfiguration {
/**
* To store Erroness services
*/
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseMetadata.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseMetadata.java?rev=169811&r1=169810&r2=169811&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseMetadata.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseMetadata.java Thu May 12 06:05:52 2005
@@ -29,7 +29,17 @@
public static final int FAULT_IN_FLOW = 3;
public static final int FAULT_OUT_FLOW = 4;
- public static final String PRE_DISPATCH = "pre-dispatch";
+ //INFLOW
+ public static final String PHASE_TRANSPORTIN = "TransportIn";
+ public static final String PHASE_PRE_DISPATCH = "PreDispatch";
+ public static final String PHASE_DISPATCH ="Dispatch";
+ public static final String PHASE_POST_DISPATCH ="PostDispatch";
+ public static final String PHASE_POLICY_DETERMINATION ="PolicyDetermination";
+ public static final String PHASE_MESSAGE_PROCESSING ="MessageProcessing";
+
+ //OUTFLOW
+ public static final String PHASE_MESSAGE_OUT ="MessageOut";
+
/**
* Field BOTH_BEFORE_AFTER
*/
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java?rev=169811&r1=169810&r2=169811&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java Thu May 12 06:05:52 2005
@@ -153,23 +153,9 @@
ArrayList allHandlers = new ArrayList();
ModuleDescription module;
Flow flow = null;
- ArrayList modules = (ArrayList) axisService.getModules();
- ///////////////////////////////////////////////////////////////////////////////////////
- ///////////////////// GLOBAL HANDLERS ////////////////////////////////////////////////
- for (int i = 0; i < modules.size(); i++) {
- QName name = (QName) modules.get(i);
- module = engineConfig.getModule(name);
- if (module != null) {
- buildModuleHandlers(allHandlers, module, flowtype);
- } else {
- throw new PhaseException("Referred module is NULL " + name.getLocalPart());
- }
- }
///////////////////////////////////////////////////////////////////////////////////////////
////////////////////////// SERVICE HANDLERS ///////////////////////////////////////////////
-
-
switch (flowtype) {
case PhaseMetadata.IN_FLOW:
{
@@ -216,7 +202,7 @@
}
}
///////////////////////////////////////////////////////////////////////////////////////
- ///////////////////// OPERATION HANDLERS ////////////////////////////////////////////////
+ ///////////////////// OPERATION MODULES ////////////////////////////////////////////////
Collection opmodule = operation.getModules();
Iterator opitr = opmodule.iterator();
while (opitr.hasNext()) {
Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/util/FlowBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/util/FlowBuilder.java?rev=169811&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/util/FlowBuilder.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/util/FlowBuilder.java Thu May 12 06:05:52 2005
@@ -0,0 +1,60 @@
+package org.apache.axis.phaseresolver.util;
+
+import org.apache.axis.engine.Phase;
+import org.apache.axis.engine.AddressingBasedDispatcher;
+import org.apache.axis.engine.RequestURIBasedDispatcher;
+import org.apache.axis.phaseresolver.PhaseMetadata;
+
+import java.util.ArrayList;
+
+/*
+ * 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.
+ *
+ *
+ */
+
+/**
+ * Author : Deepal Jayasinghe
+ * Date: May 12, 2005
+ * Time: 6:45:50 PM
+ */
+public class FlowBuilder {
+
+ /**
+ * This method is used to build the default sytem predefined phases, and this will be latter cahange
+ * by the deployment module
+ * @return
+ */
+ public static ArrayList getSystemINPhases(){
+ ArrayList phases = new ArrayList();
+ phases.add(new Phase(PhaseMetadata.PHASE_TRANSPORTIN));
+ phases.add(new Phase(PhaseMetadata.PHASE_PRE_DISPATCH));
+ Phase dispatch = new Phase(PhaseMetadata.PHASE_DISPATCH);
+ dispatch.addHandler(new RequestURIBasedDispatcher(),0);
+ dispatch.addHandler(new AddressingBasedDispatcher(),1);
+ phases.add(dispatch) ;
+ phases.add(new Phase(PhaseMetadata.PHASE_POST_DISPATCH));
+ phases.add(new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
+ return phases;
+ }
+
+ public static ArrayList getOutPhases(){
+ ArrayList outPhases = new ArrayList();
+ outPhases.add(new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
+ outPhases.add(new Phase(PhaseMetadata.PHASE_MESSAGE_OUT));
+ return outPhases;
+ }
+
+}