axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/utils resources.properties
Date Fri, 21 Dec 2001 12:13:40 GMT
rubys       01/12/21 04:13:40

  Modified:    java/src/org/apache/axis Chain.java SimpleChain.java
               java/src/org/apache/axis/utils resources.properties
  Log:
  Simplify chain processing.
  Submitted by: Glyn Normington <glyn_normington@uk.ibm.com>
  
  Revision  Changes    Path
  1.11      +1 -11     xml-axis/java/src/org/apache/axis/Chain.java
  
  Index: Chain.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Chain.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Chain.java	2001/10/30 16:46:34	1.10
  +++ Chain.java	2001/12/21 12:13:40	1.11
  @@ -64,16 +64,11 @@
   
   public interface Chain extends Handler {
       /**
  -     * Adds a handler to the end of the chain
  +     * Adds a handler to the end of the chain. May not be called after invoke.
        */
       public void addHandler(Handler handler);
   
       /**
  -     * Removes the specified handler from the chain
  -     */
  -    public void removeHandler(int index);
  -
  -    /**
        * Is this handler in the chain?
        */
       public boolean contains(Handler handler);
  @@ -82,11 +77,6 @@
        * Get the list of handlers in the chain - is Handler[] the right form?
        */
       public Handler[] getHandlers();
  -
  -    /**
  -     * Erase the contents of the chain
  -     */
  -    public void clear();
   
       // How many do we want to force people to implement?
   };
  
  
  
  1.36      +7 -9      xml-axis/java/src/org/apache/axis/SimpleChain.java
  
  Index: SimpleChain.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/SimpleChain.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- SimpleChain.java	2001/12/03 22:49:22	1.35
  +++ SimpleChain.java	2001/12/21 12:13:40	1.36
  @@ -78,6 +78,7 @@
   
       protected Vector     handlers ;
       protected Hashtable  options ;
  +    protected boolean    invoked;
   
       public void init() {
           for ( int i = 0 ; i < handlers.size() ; i++ )
  @@ -98,6 +99,7 @@
        * rethrow the exception.
        */
       public void invoke(MessageContext msgContext) throws AxisFault {
  +        invoked = true;
           doVisiting(msgContext, iVisitor);
       }
   
  @@ -106,6 +108,7 @@
        * contributing to a WSDL description.
        */
       public void generateWSDL(MessageContext msgContext) throws AxisFault {
  +        invoked = true;
           doVisiting(msgContext, wsdlVisitor);
       }
   
  @@ -170,18 +173,13 @@
           if (handler == null)
               throw new NullPointerException(
                       JavaUtils.getMessage("nullHandler00", "SimpleChain::addHandler"));
  +
  +        if (invoked)
  +            throw new NullPointerException(
  +                    JavaUtils.getMessage("addAfterInvoke00", "SimpleChain::addHandler"));
           
           if ( handlers == null ) handlers = new Vector();
           handlers.add( handler );
  -    }
  -
  -    public void removeHandler(int index) {
  -        if ( handlers != null )
  -            handlers.removeElementAt( index );
  -    }
  -
  -    public void clear() {
  -        handlers.clear();
       }
   
       public boolean contains(Handler handler) {
  
  
  
  1.32      +1 -0      xml-axis/java/src/org/apache/axis/utils/resources.properties
  
  Index: resources.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/resources.properties,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- resources.properties	2001/12/13 17:33:17	1.31
  +++ resources.properties	2001/12/21 12:13:40	1.32
  @@ -4,6 +4,7 @@
   # 3.  If a single quote character is to appear in the resulting message, it must appear
in this file as two consecutive single quote characters.
   # 4.  Lines beginning with "#" (like this one) are comment lines and may contain translation
instructions.  They need not be translated unless your translated file, rather than this file,
will serve as a base for other translators.
   
  +addAfterInvoke00={0}:  the chain has already been invoked
   addBody00=Adding body element to message...
   addHeader00=Adding header to message...
   addTrailer00=Adding trailer to message...
  
  
  

Mime
View raw message