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/common JniHandler.java
Date Thu, 06 Jun 2002 00:59:10 GMT
costin      2002/06/05 17:59:10

  Modified:    jk/java/org/apache/jk/common JniHandler.java
  Log:
  Just a bit of cleanup, remove dead code.
  
  Revision  Changes    Path
  1.9       +10 -15    jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JniHandler.java
  
  Index: JniHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JniHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JniHandler.java	1 Jun 2002 08:29:34 -0000	1.8
  +++ JniHandler.java	6 Jun 2002 00:59:10 -0000	1.9
  @@ -234,12 +234,14 @@
           apr.jkRecycle(ep.getJniEnv(), ep.getJniContext());
       }
       
  -    /** send and get the response in the same buffer.
  +    /** send and get the response in the same buffer. This calls the 
  +    * method on the wrapped jk_bean object. 
        */
       protected int nativeDispatch( Msg msg, MsgContext ep, int code, int raw )
           throws IOException
       {
  -        if( log.isDebugEnabled() ) log.debug( "Sending packet " + code + " " + raw);
  +        if( log.isDebugEnabled() ) 
  +            log.debug( "Sending packet " + code + " " + raw);
   
           if( raw == 0 ) {
               msg.end();
  @@ -267,7 +269,8 @@
           int status=apr.jkInvoke( xEnv,
                                    nativeJkHandlerP,
                                    nativeContext,
  -                                 code, msg.getBuffer(), 0, msg.getLen(), raw ); 
  +                                 code, msg.getBuffer(), 0, msg.getLen(), raw );
  +                                 
           if( status != 0 && status != 2 ) {
               log.error( "nativeDispatch: error " + status );
           }
  @@ -276,30 +279,22 @@
           return status;
       }
   
  +    /** Base implementation for invoke. Dispatch the action to the native
  +    * code, where invoke() is called on the wrapped jk_bean.
  +    */
       public  int invoke(Msg msg, MsgContext ep )
           throws IOException
       {
           long xEnv=ep.getJniEnv();
           int type=ep.getType();
   
  -        switch( type ) {
  -        case JkHandler.HANDLE_RECEIVE_PACKET:
  -            //            return receive( msg, ep );
  -        case JkHandler.HANDLE_SEND_PACKET:
  -            //            return send( msg, ep );
  -        }
  -
           int status=nativeDispatch(msg, ep, type, 0 );
           
           apr.jkRecycle(xEnv, ep.getJniContext());
  -
  -        if(log.isInfoEnabled() ) log.info("Jni invoke status " + status);
  - 
           apr.releaseJkEnv( xEnv );
  -        return 0;
  +        return status;
       }    
   
       private static org.apache.commons.logging.Log log=
           org.apache.commons.logging.LogFactory.getLog( JniHandler.class );
  -
   }
  
  
  

--
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