Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.jk.common
Class HandlerRequest  view HandlerRequest download HandlerRequest.java

java.lang.Object
  extended byorg.apache.jk.core.JkHandler
      extended byorg.apache.jk.common.HandlerRequest
All Implemented Interfaces:
java.util.EventListener, javax.management.MBeanRegistration, javax.management.NotificationListener

public class HandlerRequest
extends org.apache.jk.core.JkHandler

Handle messages related with basic request information. This object can handle the following incoming messages: - "FORWARD_REQUEST" input message ( sent when a request is passed from the web server ) - "RECEIVE_BODY_CHUNK" input ( sent by container to pass more body, in response to GET_BODY_CHUNK ) It can handle the following outgoing messages: - SEND_HEADERS. Pass the status code and headers. - SEND_BODY_CHUNK. Send a chunk of body - GET_BODY_CHUNK. Request a chunk of body data - END_RESPONSE. Notify the end of a request processing.


Field Summary
private  java.lang.String ajpidDir
           
(package private) static int count
           
private  boolean decoded
           
private  boolean delayInitialRead
           
private  HandlerDispatch dispatch
           
static int HOSTBUFFER
           
private static java.lang.Object lock
          Thread lock.
private static org.apache.commons.logging.Log log
           
private  boolean registerRequests
           
private  java.lang.String requiredSecret
           
private  int secretNote
           
private  boolean shutdownEnabled
           
private  int tmpBufNote
           
private  boolean tomcatAuthentication
           
 
Fields inherited from class org.apache.jk.core.JkHandler
domain, ERROR, HANDLE_FLUSH, HANDLE_RECEIVE_PACKET, HANDLE_SEND_PACKET, HANDLE_THREAD_END, id, LAST, mserver, name, next, nextName, OK, oname, properties, wEnv
 
Constructor Summary
HandlerRequest()
           
 
Method Summary
private  org.apache.coyote.Request checkRequest(org.apache.jk.core.MsgContext ep)
           
private  int decodeAttributes(org.apache.jk.core.MsgContext ep, org.apache.jk.core.Msg msg, org.apache.coyote.Request req, org.apache.tomcat.util.buf.MessageBytes tmpMB)
           
private  void decodeHeaders(org.apache.jk.core.MsgContext ep, org.apache.jk.core.Msg msg, org.apache.coyote.Request req, org.apache.tomcat.util.buf.MessageBytes tmpMB)
           
private  int decodeRequest(org.apache.jk.core.Msg msg, org.apache.jk.core.MsgContext ep, org.apache.tomcat.util.buf.MessageBytes tmpMB)
           
private  void generateAjp13Id()
           
 boolean getDelayInitialRead()
          Get the flag to tell if we delay the initial body read
 boolean getRegisterRequests()
          Get the flag to tell if we JMX register requests.
 boolean getShutdownEnabled()
           
 void init()
          Should register the request types it can handle, same style as apache2.
 int invoke(org.apache.jk.core.Msg msg, org.apache.jk.core.MsgContext ep)
           
 boolean isTomcatAuthentication()
           
private  void parseHost(org.apache.tomcat.util.buf.MessageBytes valueMB, org.apache.coyote.Request request)
          Parse host.
 void setAjpidDir(java.lang.String path)
           
 void setDecodedUri(boolean b)
           
 void setDelayInitialRead(boolean dir)
          Set the flag to delay the initial body read
 void setRegisterRequests(boolean srr)
          Set the flag to tell if we JMX register requests.
 void setSecret(java.lang.String s)
           
 void setShutdownEnabled(boolean se)
           
 void setTomcatAuthentication(boolean newTomcatAuthentication)
           
 void setUseSecret(boolean b)
           
 
Methods inherited from class org.apache.jk.core.JkHandler
addHandlerCallback, createMsgContext, destroy, getDomain, getId, getName, getNext, getObjectName, getProperty, handleNotification, pause, postDeregister, postRegister, preDeregister, preRegister, resume, setId, setName, setNext, setNext, setProperty, setWorkerEnv
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

HOSTBUFFER

public static final int HOSTBUFFER
See Also:
Constant Field Values

lock

private static java.lang.Object lock
Thread lock.


dispatch

private HandlerDispatch dispatch

ajpidDir

private java.lang.String ajpidDir

requiredSecret

private java.lang.String requiredSecret

secretNote

private int secretNote

tmpBufNote

private int tmpBufNote

decoded

private boolean decoded

tomcatAuthentication

private boolean tomcatAuthentication

registerRequests

private boolean registerRequests

shutdownEnabled

private boolean shutdownEnabled

delayInitialRead

private boolean delayInitialRead

count

static int count
Constructor Detail

HandlerRequest

public HandlerRequest()
Method Detail

init

public void init()
Description copied from class: org.apache.jk.core.JkHandler
Should register the request types it can handle, same style as apache2.


setSecret

public void setSecret(java.lang.String s)

setUseSecret

public void setUseSecret(boolean b)

setDecodedUri

public void setDecodedUri(boolean b)

isTomcatAuthentication

public boolean isTomcatAuthentication()

setShutdownEnabled

public void setShutdownEnabled(boolean se)

getShutdownEnabled

public boolean getShutdownEnabled()

setTomcatAuthentication

public void setTomcatAuthentication(boolean newTomcatAuthentication)

setAjpidDir

public void setAjpidDir(java.lang.String path)

setRegisterRequests

public void setRegisterRequests(boolean srr)
Set the flag to tell if we JMX register requests.


getRegisterRequests

public boolean getRegisterRequests()
Get the flag to tell if we JMX register requests.


setDelayInitialRead

public void setDelayInitialRead(boolean dir)
Set the flag to delay the initial body read


getDelayInitialRead

public boolean getDelayInitialRead()
Get the flag to tell if we delay the initial body read


generateAjp13Id

private void generateAjp13Id()

invoke

public int invoke(org.apache.jk.core.Msg msg,
                  org.apache.jk.core.MsgContext ep)
           throws java.io.IOException

checkRequest

private org.apache.coyote.Request checkRequest(org.apache.jk.core.MsgContext ep)

decodeRequest

private int decodeRequest(org.apache.jk.core.Msg msg,
                          org.apache.jk.core.MsgContext ep,
                          org.apache.tomcat.util.buf.MessageBytes tmpMB)
                   throws java.io.IOException

decodeAttributes

private int decodeAttributes(org.apache.jk.core.MsgContext ep,
                             org.apache.jk.core.Msg msg,
                             org.apache.coyote.Request req,
                             org.apache.tomcat.util.buf.MessageBytes tmpMB)

decodeHeaders

private void decodeHeaders(org.apache.jk.core.MsgContext ep,
                           org.apache.jk.core.Msg msg,
                           org.apache.coyote.Request req,
                           org.apache.tomcat.util.buf.MessageBytes tmpMB)

parseHost

private void parseHost(org.apache.tomcat.util.buf.MessageBytes valueMB,
                       org.apache.coyote.Request request)
                throws java.io.IOException
Parse host.