axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@apache.org
Subject cvs commit: xml-axis/java/src/javax/xml/rpc/handler Handler.java HandlerChain.java HandlerInfo.java HandlerRegistry.java
Date Thu, 28 Mar 2002 20:29:48 GMT
butek       02/03/28 12:29:48

  Modified:    java     TODO.txt
               java/src/javax/xml/rpc/handler Handler.java
                        HandlerChain.java HandlerInfo.java
                        HandlerRegistry.java
  Log:
  Updated javax.xml.rpc.handler interfaces/class to JAX-RPC 0.8.
  
  Revision  Changes    Path
  1.33      +2 -0      xml-axis/java/TODO.txt
  
  Index: TODO.txt
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/TODO.txt,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- TODO.txt	27 Mar 2002 20:24:06 -0000	1.32
  +++ TODO.txt	28 Mar 2002 20:29:48 -0000	1.33
  @@ -22,6 +22,8 @@
   ! <> Implement Service.getHandlerRegistry() method.
   ! <> Implement ServiceFactory.createService methods.
   ! <> Implement TypeMapping and TypeMappingRegistry ala JAX-RPC 0.8
  +! <> Implement Handler code ala JAX-RPC 0.8
  +! <> Once we get word that javax.xml.rpc.encoding.XMLType is a real class (it's in
the JAX-RPC javadocs but not in the spec) then replace all the constants in org.apache.axis.encoding.XMLType
with the JAX-RPC constants.
   
   SOAP 1.2 SUPPORT
   ----------------
  
  
  
  1.2       +64 -29    xml-axis/java/src/javax/xml/rpc/handler/Handler.java
  
  Index: Handler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/handler/Handler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Handler.java	29 Jan 2002 01:52:45 -0000	1.1
  +++ Handler.java	28 Mar 2002 20:29:48 -0000	1.2
  @@ -55,10 +55,7 @@
   
   package javax.xml.rpc.handler;
   
  -import java.util.Map;
  -
  -import javax.xml.rpc.JAXRPCException;
  -import javax.xml.rpc.soap.SOAPFault;
  +import javax.xml.rpc.namespace.QName;
   
   /**
    * A handler provides a mechanism for processing of service
  @@ -70,31 +67,62 @@
   public interface Handler {
   
       /**
  -     * The handle method performs the actual processing work for
  -     * a handler. An implementation class for the Handler interface
  -     * is required to provide a default constructor.
  -     *  @param   context MessageContext parameter provides access to
  -     *            the message context (for example: SOAP message
  -     *            that carries an RPC request) that is processed
  -     *            by a handler.
  -     *  @throws  JAXRPCException if any handler specific processing
  -     *            error happens
  -     *  @throws  SOAPFault if SOAP fault is generated by this handler
  -     */
  -    public abstract void handle(MessageContext context)
  -        throws JAXRPCException, SOAPFault;
  -
  -    /**
  -     * The init method to enable the Handler instance to initialize
  -     * itself. The init method passes the handler configuration
  -     * properties as a Map instance. These configuration properties
  -     * are used to configure the Handler (for example: setup access
  -     * to an external resource or service) during initialization.
  -     *  @param   config Configuration parameters for initialization of
  -     *          handler
  -     *  @throws  JAXRPCException If initialization of the handler fails
  +     * The handleRequest method processes the request message.
  +     *
  +     * @param context - MessageContext parameter provides access to the request
  +     *                  message.
  +     *
  +     * @throws JAXRPCException - if any handler specific runtime error happens.
  +     *         The HandlerChain terminates the further processing of this
  +     *         handler chain.
  +     *         SOAPFaultException - if SOAP fault is generated by this handler.
  +     *         The HandlerChain catches this exception, terminates the further
  +     *         processing of the request handlers in this handler chain and
  +     *         invokes the handleFault method on this handler
  +     */
  +    public boolean handleRequest(MessageContext context);
  +
  +    /**
  +     * The handleResponse method processes the response message.
  +     *
  +     * @param context - MessageContext parameter provides access to the response
  +     *                  message
  +     *
  +     * @return Processing mode.  Return true to indicate continued processing of
  +     *         the response handler chain. The HandlerChain invokes the
  +     *         handleRespons method on the next Handler in the handler chain. 
  +     *         Return false to indicate blocking of the response handler chain.
  +     *         In this  case, no other response handlers in the handler chain
  +     *         are invoked.
  +     *
  +     * @throws JAXRPCException - if any handler specific runtime error happens.
  +     *         The HandlerChain terminates the further processing of this handler
  +     *         chain.
  +     */
  +    public boolean handleResponse(MessageContext context);
  +
  +    /**
  +     * The handleFault method processes the SOAP faults based on the SOAP
  +     * message processing model.
  +     *
  +     * @param  context - MessageContext parameter provides access to the SOAP
  +     *         message.
  +     * @throws JAXRPCException - if any handler specific runtime error
        */
  -    public abstract void init(Map config) throws JAXRPCException;
  +    public void handleFault(MessageContext context);
  +
  +    /**
  +     * The init method to enable the Handler instance to initialize itself. The
  +     * init method passes the handler configuration properties as a Map
  +     * instance. These configuration properties are used to configure the
  +     * Handler (for example: setup access to an external resource or service)
  +     * during initialization.
  +     *
  +     * @param HandlerInfo - Configuration for the initialization of this handler
  +     *
  +     * @throws JAXRPCException - If initialization of the handler fails
  +     */
  +    public abstract void init(HandlerInfo config);
   
       /**
        * The destroy method indicates the end of lifecycle for a Handler
  @@ -104,5 +132,12 @@
        * instance is no longer needed.
        * @throws  JAXRPCException  If any error during destroy
        */
  -    public abstract void destroy() throws JAXRPCException;
  +    public abstract void destroy();
  +
  +    /**
  +     * Gets the header blocks processed by this Handler instance.
  +     *
  +     * @return The header blocks.
  +     */
  +    public QName[] getHeaders();
   }
  
  
  
  1.2       +61 -1     xml-axis/java/src/javax/xml/rpc/handler/HandlerChain.java
  
  Index: HandlerChain.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/handler/HandlerChain.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HandlerChain.java	29 Jan 2002 01:52:45 -0000	1.1
  +++ HandlerChain.java	28 Mar 2002 20:29:48 -0000	1.2
  @@ -56,6 +56,7 @@
   package javax.xml.rpc.handler;
   
   import java.util.List;
  +import java.util.Map;
   
   /**
    * The <code>javax.xml.rpc.handler.HandlerChain</code> represents an
  @@ -65,4 +66,63 @@
    * the policy and mechanism for the invocation of the registered
    * handlers.
    */
  -public interface HandlerChain extends Handler, List {}
  +public interface HandlerChain extends List {
  +
  +    /**
  +     * The handleRequest method initiates the request processing for this
  +     * handler chain.
  +     * @param context - MessageContext parameter provides access to the request
  +     *                  SOAP message.
  +     *
  +     * @throws JAXRPCException - if any processing error happens
  +     */
  +    public void handleRequest(MessageContext context);
  +
  +    /**
  +     * The handleResponse method initiates the response processing for this
  +     * handler chain.
  +     *
  +     * @param context - MessageContext parameter provides access to the response
  +     *                  SOAP message.
  +     *
  +     * @throws JAXRPCException - if any processing error happens
  +     */
  +    public void handleResponse(MessageContext context);
  +
  +    /**
  +     * Initializes the configuration for a HandlerChain.
  +     *
  +     * @param config - Configuration for the initialization of this handler
  +     *                 chain
  +     *
  +     * @throws JAXRPCException - If any error during initialization
  +     */
  +    public void init(Map config);
  +
  +    /**
  +     * Indicates the end of lifecycle for a HandlerChain.
  +     *
  +     * @throws JAXRPCException - If any error during destroy
  +     */
  +    public void destroy();
  +
  +    /**
  +     * Sets SOAP Actor roles for this HandlerChain. This specifies the set of
  +     * roles in which this HandlerChain is to act for the SOAP message
  +     * processing at this SOAP node. These roles assumed by a HandlerChain must
  +     * be invariant during the processing of an individual SOAP message.
  +     * <p>
  +     * A HandlerChain always acts in the role of the special SOAP actor next.
  +     * Refer to the SOAP specification for the URI name for this special SOAP
  +     * actor. There is no need to set this special role using this method.
  +     *
  +     * @param soapActorNames - URIs for SOAP actor name
  +     */
  +    public void setRoles(String[] soapActorNames);
  +
  +    /**
  +     * Gets SOAP actor roles registered for this HandlerChain at this SOAP node.
  +     * The returned array includes the special SOAP actor next.
  +     */
  +    public java.lang.String[] getRoles();
  +}
  
  
  
  1.2       +24 -1     xml-axis/java/src/javax/xml/rpc/handler/HandlerInfo.java
  
  Index: HandlerInfo.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/handler/HandlerInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HandlerInfo.java	29 Jan 2002 01:52:45 -0000	1.1
  +++ HandlerInfo.java	28 Mar 2002 20:29:48 -0000	1.2
  @@ -60,6 +60,8 @@
   import java.util.HashMap;
   import java.util.Map;
   
  +import javax.xml.rpc.namespace.QName;
  +
   /**
    * The <code>javax.xml.rpc.handler.HandlerInfo</code> represents
    * information about a handler in the HandlerChain. All elements
  @@ -79,10 +81,14 @@
        *  <p>
        *  @param  handlerClass Class for the Handler
        *  @param  config Handler Configuration as a java.util.Map
  +     *  @param  headers QNames for the header blocks processed
  +     *          by this Handler.  QName is the qualified name
  +     *          of the outermost element of a header block
        */
  -    public HandlerInfo(Class handlerClass, Map config) {
  +    public HandlerInfo(Class handlerClass, Map config, QName[] headers) {
           this.handlerClass = handlerClass;
           this.config = config;
  +        this.headers = headers;
       }
   
       /**
  @@ -119,9 +125,26 @@
           return config;
       }
   
  +    /**
  +     * Set the header blocks.
  +     */
  +    public void setHeaders(QName[] headers) {
  +        this.headers = headers;
  +    }
  +
  +    /**
  +     * Get the header blocks.
  +     */
  +    public QName[] getHeaders() {
  +        return headers;
  +    }
  +
       /** Handler Class */
       private Class handlerClass;
   
       /** Configuration Map */
       private Map config;
  +
  +    /** headers */
  +    private QName[] headers;
   }
  
  
  
  1.2       +6 -29     xml-axis/java/src/javax/xml/rpc/handler/HandlerRegistry.java
  
  Index: HandlerRegistry.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/handler/HandlerRegistry.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HandlerRegistry.java	29 Jan 2002 01:52:45 -0000	1.1
  +++ HandlerRegistry.java	28 Mar 2002 20:29:48 -0000	1.2
  @@ -57,7 +57,6 @@
   
   import java.io.Serializable;
   
  -import javax.xml.rpc.JAXRPCException;
   import javax.xml.rpc.namespace.QName;
   
   /**
  @@ -68,15 +67,17 @@
   public interface HandlerRegistry extends Serializable {
   
       /**
  -     *  Gets the request HandlerChain for the specified service endpoint.
  +     * Gets the handler chain for the specified service endpoint. The returned
  +     * List is used to configure this specific handler chain in this
  +     * HandlerRegistry.
        *  @param   portName Qualified name of the target service
        *  @return  HandlerChain Returns the registered HandlerChain;
        *  @throws java.lang.IllegalArgumentException If an invalid portName is specified
        */
  -    public abstract HandlerChain getRequestHandlerChain(QName portName);
  +    public HandlerChain getHandlerChain(QName portName);
   
       /**
  -     *  Sets the request HandlerChain for the specified service endpoint.
  +     *  Sets the handler chain for the specified service endpoint.
        *  @param   portName Qualified name of the target service endpoint
        *  @param   chain Request HandlerChain instance
        *  @throws  JAXRPCException If any error in the setting of
  @@ -89,29 +90,5 @@
        *     portName is specified
        */
       public abstract void setRequestHandlerChain(
  -        QName portName, HandlerChain chain) throws JAXRPCException;
  -
  -    /**
  -     *  Gets the response HandlerChain for the specified service endpoint.
  -     *  @param   portName  Qualified name of the target service endpoint
  -     *  @return   HandlerChain Returns the registered HandlerChain;
  -     *  @throws java.lang.IllegalArgumentException If an invalid portName is specified
  -     */
  -    public abstract HandlerChain getResponseHandlerChain(QName portName);
  -
  -    /**
  -     *  Sets the response HandlerChain for the specified service endpoint.
  -     *  @param   portName Qualified name of the target service endpoint
  -     *  @param   chain Response HandlerChain instance.
  -     *  @throws  JAXRPCException  If any error in the setting of
  -     *            the HandlerChain
  -     *  @throws java.lang.UnsupportedOperationException  If this
  -     *     set operation is not supported. This is done to
  -     *     avoid any overriding of a pre-configured handler
  -     *     chain.
  -     *  @throws java.lang.IllegalArgumentException If an invalid
  -     *    portName is specified
  -     */
  -    public abstract void setResponseHandlerChain(
  -        QName portName, HandlerChain chain) throws JAXRPCException;
  +            QName portName, HandlerChain chain);
   }
  
  
  

Mime
View raw message