Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » coyote » ajp » [javadoc | source]
org.apache.coyote.ajp
public class: AjpAprProcessor [javadoc | source]
java.lang.Object
   org.apache.coyote.ajp.AjpAprProcessor

All Implemented Interfaces:
    ActionHook

Processes HTTP requests.
Nested Class Summary:
protected class  AjpAprProcessor.SocketInputBuffer  This class is an input buffer which will read its data from an input stream. 
protected class  AjpAprProcessor.SocketOutputBuffer  This class is an output buffer which will write data to an output stream. 
Field Summary
protected static  Log log    Logger. 
protected static  StringManager sm    The string manager for this package. 
protected  Adapter adapter    Associated adapter. 
protected  Request request    Request object. 
protected  Response response    Response object. 
protected  AjpMessage requestHeaderMessage    Header message. Note that this header is merely the one used during the processing of the first message of a "request", so it might not be a request header. It will stay unchanged during the processing of the whole request. 
protected  AjpMessage responseHeaderMessage    Message used for response header composition. 
protected  AjpMessage bodyMessage    Body message. 
protected  MessageBytes bodyBytes    Body message. 
protected  boolean started    State flag. 
protected  boolean error    Error flag. 
protected  long socket    Socket associated with the current connection. 
protected  char[] hostNameC    Host name (used to avoid useless B2C conversion on the host name). 
protected  AprEndpoint endpoint    Associated endpoint. 
protected  MessageBytes tmpMB    Temp message bytes used for processing. 
protected  MessageBytes certificates    Byte chunk for certs. 
protected  boolean endOfStream    End of stream flag. 
protected  boolean empty    Body empty flag. 
protected  boolean first    First read. 
protected  boolean replay    Replay read. 
protected  boolean finished    Finished response. 
protected  ByteBuffer outputBuffer    Direct buffer used for output. 
protected  ByteBuffer inputBuffer    Direct buffer used for input. 
protected static final  ByteBuffer getBodyMessageBuffer    Direct buffer used for sending right away a get body message. 
protected static final  ByteBuffer pongMessageBuffer    Direct buffer used for sending right away a pong message. 
protected static final  byte[] endMessageArray    End message array. 
protected static final  ByteBuffer flushMessageBuffer    Direct buffer used for sending explicit flush message. 
protected  boolean tomcatAuthentication    Use Tomcat authentication ? 
protected  String requiredSecret    Required secret. 
Constructor:
 public AjpAprProcessor(int packetSize,
    AprEndpoint endpoint) 
Method from org.apache.coyote.ajp.AjpAprProcessor Summary:
action,   finish,   flush,   getAdapter,   getRequest,   getTomcatAuthentication,   parseHost,   prepareRequest,   prepareResponse,   process,   read,   readMessage,   readt,   receive,   recycle,   setAdapter,   setRequiredSecret,   setTomcatAuthentication
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.coyote.ajp.AjpAprProcessor Detail:
 public  void action(ActionCode actionCode,
    Object param) 
    Send an action to the connector.
 protected  void finish() throws IOException 
    Finish AJP response.
 protected  void flush() throws IOException 
    Callback to write data from the buffer.
 public Adapter getAdapter() 
    Get the associated adapter.
 public Request getRequest() 
    Get the request associated with this processor.
 public boolean getTomcatAuthentication() 
 public  void parseHost(MessageBytes valueMB) 
    Parse host.
 protected  void prepareRequest() 
    After reading the request headers, we have to setup the request filters.
 protected  void prepareResponse() throws IOException 
    When committing the response, we have to validate the set of headers, as well as setup the response filters.
 public boolean process(long socket) throws IOException 
    Process pipelined HTTP requests using the specified input and output streams.
 protected boolean read(int n) throws IOException 
    Read at least the specified amount of bytes, and place them in the input buffer.
 protected boolean readMessage(AjpMessage message,
    boolean first,
    boolean useAvailableData) throws IOException 
    Read an AJP message.
 protected boolean readt(int n,
    boolean useAvailableData) throws IOException 
    Read at least the specified amount of bytes, and place them in the input buffer.
 public boolean receive() throws 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
 public  void recycle() 
    Recycle the processor.
 public  void setAdapter(Adapter adapter) 
    Set the associated adapter.
 public  void setRequiredSecret(String requiredSecret) 
 public  void setTomcatAuthentication(boolean tomcatAuthentication)