Apache Tomcat 6.0.53

org.apache.jk.common
Class JkInputStream

java.lang.Object
  extended by org.apache.jk.common.JkInputStream
All Implemented Interfaces:
InputBuffer, OutputBuffer

public class JkInputStream
extends java.lang.Object
implements InputBuffer, OutputBuffer

Generic input stream impl on top of ajp


Constructor Summary
JkInputStream(MsgContext context)
          Deprecated.  
JkInputStream(MsgContext context, int bsize)
           
 
Method Summary
 void appendHead(Response res)
           
 int doRead(ByteChunk responseChunk, Request req)
          Return from the input stream.
 int doWrite(ByteChunk chunk, Response res)
          Write the response.
 void endMessage()
           
 boolean isReadRequired()
          Return the flag saying that the server is sending a body
 boolean receive()
          Receive a chunk of data.
 void recycle()
          Must be called before or after each request
 void setIsReadRequired(boolean irr)
          Set the flag saying that the server is sending a body
 void setReplay(ByteChunk replay)
          Set the replay buffer for Form auth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JkInputStream

public JkInputStream(MsgContext context,
                     int bsize)

JkInputStream

public JkInputStream(MsgContext context)
Deprecated. 

Method Detail

setIsReadRequired

public void setIsReadRequired(boolean irr)
Set the flag saying that the server is sending a body


isReadRequired

public boolean isReadRequired()
Return the flag saying that the server is sending a body


recycle

public void recycle()
Must be called before or after each request


endMessage

public void endMessage()
                throws java.io.IOException
Throws:
java.io.IOException

doWrite

public int doWrite(ByteChunk chunk,
                   Response res)
            throws java.io.IOException
Description copied from interface: OutputBuffer
Write the response. The caller ( tomcat ) owns the chunks.

Specified by:
doWrite in interface OutputBuffer
Parameters:
chunk - data to write
res - used to allow buffers that can be shared by multiple responses.
Throws:
java.io.IOException

doRead

public int doRead(ByteChunk responseChunk,
                  Request req)
           throws java.io.IOException
Description copied from interface: InputBuffer
Return from the input stream. IMPORTANT: the current model assumes that the protocol will 'own' the buffer and return a pointer to it in ByteChunk ( i.e. the param will have chunk.getBytes()==null before call, and the result after the call ).

Specified by:
doRead in interface InputBuffer
Throws:
java.io.IOException

receive

public boolean receive()
                throws java.io.IOException
Receive a chunk of data. Called to implement the 'special' packet in ajp13 and to receive the data after we send a GET_BODY packet

Throws:
java.io.IOException

appendHead

public void appendHead(Response res)
                throws java.io.IOException
Throws:
java.io.IOException

setReplay

public void setReplay(ByteChunk replay)
Set the replay buffer for Form auth


Apache Tomcat 6.0.53

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.