axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nakam...@apache.org
Subject cvs commit: xml-axis/java/prototype/TRL_Proposal/org/apache/axis Handler.java ChainContainer.java
Date Tue, 30 Jan 2001 07:09:29 GMT
nakamury    01/01/29 23:09:29

  Added:       java/prototype/TRL_Proposal/org/apache/axis Handler.java
                        ChainContainer.java
  Log:
  Added Handler, and ChainContainer (Single Chain Impl.)
  
  Revision  Changes    Path
  1.1                  xml-axis/java/prototype/TRL_Proposal/org/apache/axis/Handler.java
  
  Index: Handler.java
  ===================================================================
  package org.apache.axis;
  
  import java.io.Serializable;
  
    /**
     * We may have to remove Serializable because we need 
     * onSerialize and onDederialize.
     */
  
  public interface Handler extends Serializable {
    /**
     * Init is called when the chain containing this Chainable object
     * is instantiated.
     */
    void init();
  
    /**
     * Cleanup is called when the chain containing this Chainable object
     * is done processing the chain.
     */
    void cleanup();
  
    /**
     * Invoke is called to do the actual work of the Chainable object.
     */
    void invoke(MessageContext message);
  
  };
  
  
  
  1.1                  xml-axis/java/prototype/TRL_Proposal/org/apache/axis/ChainContainer.java
  
  Index: ChainContainer.java
  ===================================================================
  package org.apache.axis;
  
  import java.util.Vector;
  
  final public class ChainContainer implements Handler {
      final private Vector singleChain;
      
      public ChainContainer() {
          this.singleChain = new Vector();
      }
  
      public void addHandler(Handler handler) {
          this.singleChain.add(handler);
      }
    
      public void init() {};
  
      public void cleanup() {};
  
      public void invoke(MessageContext msgCntxt) {
          int length = this.singleChain.size();
          for( int i=0; i<length; i++) {
              Handler handler = (Handler)this.singleChain.get(i);
              handler.invoke(msgCntxt);
          }        
      };
  };
  
  
  

Mime
View raw message