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 MsgAjp.java WorkerDummy.java
Date Wed, 06 Feb 2002 17:48:52 GMT
costin      02/02/06 09:48:52

  Modified:    jk/java/org/apache/jk/common MsgAjp.java WorkerDummy.java
  Log:
  Update for the api changes.
  
  Revision  Changes    Path
  1.5       +6 -1      jakarta-tomcat-connectors/jk/java/org/apache/jk/common/MsgAjp.java
  
  Index: MsgAjp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/MsgAjp.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MsgAjp.java	26 Jan 2002 07:25:53 -0000	1.4
  +++ MsgAjp.java	6 Feb 2002 17:48:52 -0000	1.5
  @@ -257,6 +257,11 @@
           return res;
       }
   
  +    public byte peekByte() {
  +        byte res = buf[pos];
  +        return res;
  +    }
  +
       public void getBytes(MessageBytes mb) {
           int length = getInt();
           if( (length == 0xFFFF) || (length == -1) ) {
  @@ -370,7 +375,7 @@
       }
   
   
  -    private static final int dL=10;
  +    private static final int dL=0;
       private static void d(String s ) {
           System.err.println( "MsgAjp: " + s );
       }
  
  
  
  1.4       +9 -13     jakarta-tomcat-connectors/jk/java/org/apache/jk/common/WorkerDummy.java
  
  Index: WorkerDummy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/WorkerDummy.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WorkerDummy.java	26 Jan 2002 07:25:53 -0000	1.3
  +++ WorkerDummy.java	6 Feb 2002 17:48:52 -0000	1.4
  @@ -73,7 +73,7 @@
   /** A dummy worker, will just send back a dummy response.
    *  Used for testing and tunning.
    */
  -public class WorkerDummy extends Worker
  +public class WorkerDummy extends JkHandler
   {
       public WorkerDummy()
       {
  @@ -88,18 +88,13 @@
        *  ready to accept new requests.
        */
       public void init() throws IOException {
  -        headersMsgNote=we.getNoteId( WorkerEnv.ENDPOINT_NOTE, "headerMsg" );
  +        headersMsgNote=wEnv.getNoteId( WorkerEnv.ENDPOINT_NOTE, "headerMsg" );
       }
    
  -    /** Clean up and stop the worker
  -     */
  -    public void destroy() throws IOException {
  -    }
  -
       MessageBytes body=new MessageBytes();
       private int headersMsgNote;
       
  -    public void service( BaseRequest req, Channel ch, Endpoint ep )
  +    public int invoke( Msg in, MsgContext ep ) // BaseRequest req, Channel ch, Endpoint
ep )
           throws IOException
       {
           MsgAjp msg=(MsgAjp)ep.getNote( headersMsgNote );
  @@ -115,25 +110,26 @@
   
           msg.appendInt(0);
           
  -        ch.send( msg, ep );
  +        ep.getChannel().send( msg, ep );
           //         msg.dump("out:" );
   
           msg.reset();
           msg.appendByte( HandlerRequest.JK_AJP13_SEND_BODY_CHUNK);
  -        msg.appendInt( 10 );
  +        msg.appendInt( body.getLength() );
           msg.appendBytes( body );
   
           
  -        ch.send(msg, ep);
  +        ep.getChannel().send(msg, ep);
   
           msg.reset();
           msg.appendByte( HandlerRequest.JK_AJP13_END_RESPONSE );
           msg.appendInt( 1 );
           
  -        ch.send(msg, ep );
  +        ep.getChannel().send(msg, ep );
  +        return OK;
       }
       
  -    private static final int dL=10;
  +    private static final int dL=0;
       private static void d(String s ) {
           System.err.println( "WorkerDummy: " + s );
       }
  
  
  

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