tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/core JkHandler.java
Date Wed, 17 Apr 2002 22:27:19 GMT
costin      02/04/17 15:27:18

  Modified:    jk/java/org/apache/jk/core JkHandler.java
  Log:
  Channel is just a special kind of Handler that supports SEND and RECEIVE
  events ( or Actions in coyote-terms).
  
  Getting the code closer to what Coyote is using, but with 'int type' in
  MsgContext instead of Action and ActionCode.
  
  Now the Handler can be used as a generic callback from JNI ( and not only
  for request processing - the signals will also invoke a handler )
  
  Revision  Changes    Path
  1.6       +13 -7     jakarta-tomcat-connectors/jk/java/org/apache/jk/core/JkHandler.java
  
  Index: JkHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/core/JkHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JkHandler.java	10 Apr 2002 23:53:11 -0000	1.5
  +++ JkHandler.java	17 Apr 2002 22:27:18 -0000	1.6
  @@ -68,7 +68,7 @@
    *
    * @author Costin Manolache
    */
  -public abstract class JkHandler {
  +public class JkHandler {
       public static final int OK=0;
       public static final int LAST=1;
       public static final int ERROR=2;
  @@ -80,8 +80,11 @@
       protected String name;
       protected int id;
   
  -    private static org.apache.commons.logging.Log log=
  -        org.apache.commons.logging.LogFactory.getLog( JkHandler.class );
  +    // XXX Will be replaced with notes and (configurable) ids
  +    // Each represents a 'chain' - similar with ActionCode in Coyote ( the concepts
  +    // will be merged ).    
  +    public static final int HANDLE_RECEIVE_PACKET   = 10;
  +    public static final int HANDLE_SEND_PACKET      = 11;
       
       public void setWorkerEnv( WorkerEnv we ) {
           this.wEnv=we;
  @@ -111,8 +114,6 @@
        *  A chain is used for Apache/3.3 style iterative invocation.
        */
       public void setNext( JkHandler h ) {
  -        if( log.isDebugEnabled() )
  -            log.debug("setNext " + h.getClass().getName());
           next=h;
       }
   
  @@ -131,8 +132,13 @@
       public void destroy() throws IOException {
       }
   
  -    public abstract int invoke(Msg msg, MsgContext mc )  throws IOException;
  -
  +    public MsgContext createMsgContext() {
  +        return new MsgContext();
  +    }
  +    
  +    public int invoke(Msg msg, MsgContext mc )  throws IOException {
  +        return OK;
  +    }
       
       public void setProperty( String name, String value ) {
           properties.put( name, value );
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message