|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.coyote.ajp.AjpProcessor
public class AjpProcessor
Processes HTTP requests.
Nested Class Summary | |
---|---|
protected class |
AjpProcessor.SocketInputBuffer
This class is an input buffer which will read its data from an input stream. |
protected class |
AjpProcessor.SocketOutputBuffer
This class is an output buffer which will write data to an output stream. |
Field Summary | |
---|---|
protected Adapter |
adapter
Associated adapter. |
protected MessageBytes |
bodyBytes
Body message. |
protected AjpMessage |
bodyMessage
Body message. |
protected MessageBytes |
certificates
Byte chunk for certs. |
protected java.lang.String |
clientCertProvider
When client certificate information is presented in a form other than instances of X509Certificate it needs to be
converted before it can be used and this property controls which JSSE
provider is used to perform the conversion. |
protected boolean |
empty
Body empty flag. |
protected static byte[] |
endMessageArray
End message array. |
protected boolean |
endOfStream
End of stream flag. |
protected JIoEndpoint |
endpoint
Associated endpoint. |
protected boolean |
error
Error flag. |
protected boolean |
finished
Finished response. |
protected boolean |
first
First read. |
protected static byte[] |
flushMessageArray
Flush message array. |
protected byte[] |
getBodyMessageArray
Direct buffer used for sending right away a get body message. |
protected char[] |
hostNameC
Host name (used to avoid useless B2C conversion on the host name). |
protected java.io.InputStream |
input
Input stream. |
protected int |
keepAliveTimeout
The number of milliseconds Tomcat will wait for a subsequent request before closing the connection. |
protected static Log |
log
Logger. |
protected java.io.OutputStream |
output
Output stream. |
protected int |
packetSize
The socket timeout used when reading the first block of the request header. |
protected static byte[] |
pongMessageArray
Direct buffer used for sending right away a pong message. |
protected long |
readTimeout
The socket timeout used when reading the first block of the request header. |
protected boolean |
replay
Replay read. |
protected Request |
request
Request object. |
protected AjpMessage |
requestHeaderMessage
Header message. |
protected java.lang.String |
requiredSecret
Required secret. |
protected Response |
response
Response object. |
protected AjpMessage |
responseHeaderMessage
Message used for response header composition. |
protected static StringManager |
sm
The string manager for this package. |
protected java.net.Socket |
socket
Socket associated with the current connection. |
protected boolean |
started
State flag. |
protected MessageBytes |
tmpMB
Temp message bytes used for processing. |
protected boolean |
tomcatAuthentication
Use Tomcat authentication ? |
Constructor Summary | |
---|---|
AjpProcessor(int packetSize,
JIoEndpoint endpoint)
|
Method Summary | |
---|---|
void |
action(ActionCode actionCode,
java.lang.Object param)
Send an action to the connector. |
protected void |
finish()
Finish AJP response. |
protected void |
flush()
Callback to write data from the buffer. |
Adapter |
getAdapter()
Get the associated adapter. |
java.lang.String |
getClientCertProvider()
|
int |
getKeepAliveTimeout()
|
int |
getMaxCookieCount()
|
Request |
getRequest()
Get the request associated with this processor. |
boolean |
getTomcatAuthentication()
|
void |
parseHost(MessageBytes valueMB)
Parse host. |
protected void |
prepareRequest()
After reading the request headers, we have to setup the request filters. |
protected void |
prepareResponse()
When committing the response, we have to validate the set of headers, as well as setup the response filters. |
void |
process(java.net.Socket socket)
Process pipelined HTTP requests using the specified input and output streams. |
protected boolean |
read(byte[] buf,
int pos,
int n)
Read at least the specified amount of bytes, and place them in the input buffer. |
protected boolean |
readMessage(AjpMessage message)
Read an AJP message. |
boolean |
receive()
Receive a chunk of data. |
void |
recycle()
Recycle the processor. |
void |
setAdapter(Adapter adapter)
Set the associated adapter. |
void |
setClientCertProvider(java.lang.String s)
|
void |
setKeepAliveTimeout(int timeout)
|
void |
setMaxCookieCount(int maxCookieCount)
|
void |
setRequiredSecret(java.lang.String requiredSecret)
|
void |
setTomcatAuthentication(boolean tomcatAuthentication)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Log log
protected static StringManager sm
protected Adapter adapter
protected Request request
protected Response response
protected int packetSize
protected AjpMessage requestHeaderMessage
protected AjpMessage responseHeaderMessage
protected AjpMessage bodyMessage
protected MessageBytes bodyBytes
protected boolean started
protected boolean error
protected java.net.Socket socket
protected java.io.InputStream input
protected java.io.OutputStream output
protected char[] hostNameC
protected JIoEndpoint endpoint
protected long readTimeout
protected MessageBytes tmpMB
protected MessageBytes certificates
protected boolean endOfStream
protected boolean empty
protected boolean first
protected boolean replay
protected boolean finished
protected final byte[] getBodyMessageArray
protected static final byte[] pongMessageArray
protected static final byte[] endMessageArray
protected static final byte[] flushMessageArray
protected boolean tomcatAuthentication
protected java.lang.String requiredSecret
protected int keepAliveTimeout
protected java.lang.String clientCertProvider
X509Certificate
it needs to be
converted before it can be used and this property controls which JSSE
provider is used to perform the conversion. For example it is used with
the AJP connectors, the HTTP APR connector and with the
SSLValve
. If not specified, the
default provider will be used.
Constructor Detail |
---|
public AjpProcessor(int packetSize, JIoEndpoint endpoint)
Method Detail |
---|
public boolean getTomcatAuthentication()
public void setTomcatAuthentication(boolean tomcatAuthentication)
public void setRequiredSecret(java.lang.String requiredSecret)
public int getKeepAliveTimeout()
public void setKeepAliveTimeout(int timeout)
public java.lang.String getClientCertProvider()
public void setClientCertProvider(java.lang.String s)
public int getMaxCookieCount()
public void setMaxCookieCount(int maxCookieCount)
public Request getRequest()
public void process(java.net.Socket socket) throws java.io.IOException
java.io.IOException
- error during an I/O operationpublic void action(ActionCode actionCode, java.lang.Object param)
action
in interface ActionHook
actionCode
- Type of the actionparam
- Action parameterpublic void setAdapter(Adapter adapter)
adapter
- the new adapterpublic Adapter getAdapter()
protected void prepareRequest()
public void parseHost(MessageBytes valueMB)
protected void prepareResponse() throws java.io.IOException
java.io.IOException
protected void finish() throws java.io.IOException
java.io.IOException
protected boolean read(byte[] buf, int pos, int n) throws java.io.IOException
java.io.IOException
public boolean receive() throws java.io.IOException
java.io.IOException
protected boolean readMessage(AjpMessage message) throws java.io.IOException
java.io.IOException
- any other failure, including incomplete readspublic void recycle()
protected void flush() throws java.io.IOException
java.io.IOException
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |