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 di...@apache.org on 2005/11/29 17:53:17 UTC
svn commit: r349758 [2/2] - in /webservices/axis2/trunk/java/modules:
codegen/src/org/apache/axis2/databinding/
core/src/org/apache/axis2/deployment/ core/src/org/apache/axis2/engine/
core/src/org/apache/axis2/transport/http/
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java?rev=349758&r1=349757&r2=349758&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java Tue Nov 29 08:53:03 2005
@@ -23,14 +23,15 @@
import java.lang.reflect.Method;
/**
- * This one Handlers the dependancy of the Service implemetation are injected before invoke the Service
+ * If the service implementation has an init method with 1 or 2 message context as its parameters, then
+ * the DependencyManager calls the init method with appropriate parameters.
*/
public class DependencyManager {
private final static String MESSAGE_CONTEXT_INJECTION_METHOD = "init";
public static void configureBusinessLogicProvider(Object obj,
- MessageContext msgctx,
- MessageContext newMsgCtx)
+ MessageContext requestMsgCtx,
+ MessageContext responseMsgCtx)
throws AxisFault {
try {
Class classToLoad = obj.getClass();
@@ -42,13 +43,13 @@
methods[i].getParameterTypes().length == 1 &&
methods[i].getParameterTypes()[0] ==
MessageContext.class) {
- methods[i].invoke(obj, new Object[]{msgctx});
+ methods[i].invoke(obj, new Object[]{requestMsgCtx});
} else if (MESSAGE_CONTEXT_INJECTION_METHOD.equals(
methods[i].getName()) &&
methods[i].getParameterTypes().length == 2 &&
methods[i].getParameterTypes()[0] == MessageContext.class &&
methods[i].getParameterTypes()[1] == MessageContext.class) {
- methods[i].invoke(obj, new Object[]{msgctx, newMsgCtx});
+ methods[i].invoke(obj, new Object[]{requestMsgCtx, responseMsgCtx});
}
}
} catch (SecurityException e) {
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java?rev=349758&r1=349757&r2=349758&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java Tue Nov 29 08:53:03 2005
@@ -26,8 +26,8 @@
import javax.xml.namespace.QName;
/**
- * This one is run after all the dispatchers and make a Operation and a Service is idenitified
- * if the message to go any further
+ * This runs after all the dispatchers and ensures that a specific operation and a service has
+ * been identified. Only then, it allows for a message to go further.
*/
public class DispatchingChecker extends AbstractHandler implements Handler {
/**
@@ -47,7 +47,7 @@
}
/**
- * Method invoke
+ * Method invoke.
*
* @param msgctx
* @throws AxisFault
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Handler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Handler.java?rev=349758&r1=349757&r2=349758&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Handler.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Handler.java Tue Nov 29 08:53:03 2005
@@ -29,7 +29,7 @@
*/
public interface Handler extends Serializable {
/**
- * Method init
+ * Method init.
*
* @param handlerdesc
*/
@@ -40,7 +40,7 @@
* If there is a fault during the processing of this method it is
* invoke's job to catch the exception and undo any partial work
* that has been completed. Once we leave 'invoke' if a fault
- * is thrown, this classes 'onFault' method will be called.
+ * is thrown, this class's 'onFault' method will be called.
* Invoke should rethrow any exceptions it catches, wrapped in
* an AxisFault.
*
@@ -52,32 +52,31 @@
/**
- * Method getName
+ * Method getName.
*
- * @return
+ * @return Returns QName
*/
public QName getName();
/**
- * Method getParameter
+ * Method getParameter.
*
* @param name
- * @return
+ * @return Returns Parameter.
*/
public Parameter getParameter(String name);
/**
- * Method cleanup
+ * Method cleanup.
*
* @throws AxisFault
*/
public void cleanup() throws AxisFault;
/**
- * To get the phaseRule of a handler it is required to get the HnadlerDescription of the handler
- * so the argumnet pass when it call return as HnadlerDescription
+ * Gets the HandlerDescription of a handler. This is used as an input to get phaseRule of a handler.
*
- * @return
+ * @return Returns HandlerDescription.
*/
public HandlerDescription getHandlerDesc();
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/InstanceDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/InstanceDispatcher.java?rev=349758&r1=349757&r2=349758&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/InstanceDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/InstanceDispatcher.java Tue Nov 29 08:53:03 2005
@@ -24,13 +24,14 @@
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.handlers.AbstractHandler;
+/**
+ * By the time the control comes to this handler, the dispatching must have happened
+ * so that the message context contains the AxisServiceGroup, AxisService and
+ * AxisOperation.
+ * This will then try to find the Contexts of ServiceGroup, Service and the Operation.
+ */
public class InstanceDispatcher extends AbstractHandler {
- /**
- * By the time the control comes to this handler the dispatching must have happened
- * so that the message context contains the AxisServiceGroup, AxisService and
- * AxisOperation.
- * This will then try to find the Contexts of ServiceGroup, Service and the Operation.
- */
+
/**
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java?rev=349758&r1=349757&r2=349758&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java Tue Nov 29 08:53:03 2005
@@ -20,10 +20,9 @@
import org.apache.axis2.context.MessageContext;
/**
- * This one receives the Message, what is does is not of concern for Axis2 (litirally).
- * Any incomming message is hand over to the MessageReceiver, if the processing produce something
- * or not as well as is there areany more SOAP Message to be sent or recived is up to the
- * Message Receiver to decide.
+ * An instance of MessageReceiver can be setup to receive messages. The application logic has no impact
+ * on the Axis Engine iself. It is upto the application logic to do whatever it needs. For e.g.
+ * the MessageReceiver can handle a message, send a response back and/or send other messages.
*/
public interface MessageReceiver {
public void receive(MessageContext messgeCtx) throws AxisFault;
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java?rev=349758&r1=349757&r2=349758&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java Tue Nov 29 08:53:03 2005
@@ -28,9 +28,7 @@
import java.util.Iterator;
/**
- * <p>This is Phase, a orderd collection of Handlers.
- * seems this is Handler Chain with order.</p>
- * Should this exttends Hanlders?
+ * A Phase is an ordered collection of Handlers.
*/
public class Phase {
/**
@@ -95,7 +93,7 @@
private boolean isOneHanlder;
/**
- * Constructor Phase
+ * Constructor Phase.
*
* @param phaseName
*/
@@ -105,7 +103,7 @@
}
/**
- * Method addHandler
+ * Method addHandler.
*
* @param handler
* @param index
@@ -119,7 +117,7 @@
}
/**
- * add to next empty handler
+ * Adds handler to the collection.
*
* @param handler
*/
@@ -131,7 +129,7 @@
}
/**
- * If need to see how this works look at the stack!
+ * invokes all the handlers in this Phase
*
* @param msgctx
* @throws org.apache.axis2.AxisFault
@@ -141,7 +139,7 @@
log.debug("Invoking phase \"" + phaseName + "\"");
}
msgctx.setPausedPhaseName(this.getPhaseName());
- //If phase first Hnadler is there then it should run first
+ //If phase first Handler is there then it should run first
if (phaseFirst != null) {
if (msgctx.isPaused()) {
return;
@@ -199,10 +197,10 @@
//////////////////////////////////////////////////////////////// FROM PhaseMetaData //////////
/**
- * Method getBeforeAfter
+ * Method getBeforeAfter.
*
* @param handler
- * @return
+ * @return Returns AFTER or ANYWHERE or BOTH_BEFORE_AFTER
* @throws org.apache.axis2.phaseresolver.PhaseException
*
*/
@@ -229,7 +227,7 @@
}
/**
- * Method setPhaseFirst
+ * Method setPhaseFirst.
*
* @param phaseFirst
* @throws PhaseException
@@ -252,7 +250,7 @@
}
/**
- * Method setPhaseLast
+ * Method setPhaseLast.
*
* @param phaseLast
* @throws PhaseException
@@ -275,7 +273,7 @@
}
/**
- * Method addHandler
+ * Method addHandler.
*
* @param handler
* @throws PhaseException
@@ -322,9 +320,7 @@
}
/**
- * This method is to check whether user try to add a handler whose before property is
- * phaseFitsr handler , this cannot allowed , so this will throws an exception
- * otherewise it will retun
+ * If the user tries to add a handler before the phase first handler, then throw an exception.
*
* @throws PhaseException
*/
@@ -343,8 +339,7 @@
}
/**
- * This method is to check user try to add or plase a hander after the phaseLast
- * that operation dose not allowd so then this throw a exception
+ * If the user tries to add a handler after the phase last handler, then throw an exception.
*
* @throws PhaseException
*/
@@ -362,7 +357,7 @@
}
/**
- * Method insertBefore
+ * Method insertBefore.
*
* @param handler
*/
@@ -393,7 +388,7 @@
}
/**
- * Method insertAfter
+ * Method insertAfter.
*
* @param handler
*/
@@ -537,9 +532,9 @@
}
/**
- * To get the all the handlers in the phase
+ * Gets all the handlers in the phase.
*
- * @return an ArrayList of Handlers
+ * @return Returns an ArrayList of Handlers
*/
public ArrayList getHandlers() {
ArrayList phaseHandlers = new ArrayList();
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java?rev=349758&r1=349757&r2=349758&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java Tue Nov 29 08:53:03 2005
@@ -27,7 +27,7 @@
import javax.xml.namespace.QName;
/**
- * Dispatches the service based on the information from the traget endpoint URL
+ * Dispatches the service based on the information from the target endpoint URL.
*/
public class RequestURIBasedDispatcher extends AbstractDispatcher {
/**
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java?rev=349758&r1=349757&r2=349758&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java Tue Nov 29 08:53:03 2005
@@ -25,7 +25,7 @@
import javax.xml.namespace.QName;
/**
- * Dispatches based on the SOAPAction
+ * Dispatches based on the SOAPAction.
*/
public class SOAPActionBasedDispatcher extends AbstractDispatcher {
/**
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java?rev=349758&r1=349757&r2=349758&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java Tue Nov 29 08:53:03 2005
@@ -29,7 +29,7 @@
/**
* Dispatches based on the namespace URI of the first child of
- * the Body.
+ * the body.
*/
public class SOAPMessageBodyBasedDispatcher extends AbstractDispatcher {
/**
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java?rev=349758&r1=349757&r2=349758&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java Tue Nov 29 08:53:03 2005
@@ -410,7 +410,7 @@
HttpServletResponse res)
throws IOException {
Collection modules =
- ((AxisConfigurationImpl) configContext.getAxisConfiguration()).getEngadgedModules();
+ ((AxisConfigurationImpl) configContext.getAxisConfiguration()).getEngagedModules();
req.getSession().setAttribute(Constants.MODULE_MAP, modules);
res.sendRedirect(LIST_GLOABLLY_ENGAGED_MODULES_JSP_NAME);
}