|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.coyote.ajp.AjpAprProcessor
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 Adapter |
adapter
Associated adapter. |
protected MessageBytes |
bodyBytes
Body message. |
protected AjpMessage |
bodyMessage
Body message. |
protected MessageBytes |
certificates
Byte chunk for certs. |
protected boolean |
empty
Body empty flag. |
protected static byte[] |
endMessageArray
End message array. |
protected boolean |
endOfStream
End of stream flag. |
protected AprEndpoint |
endpoint
Associated endpoint. |
protected boolean |
error
Error flag. |
protected boolean |
expectation
Is there an expectation ? |
protected boolean |
finished
Finished response. |
protected boolean |
first
First read. |
protected static java.nio.ByteBuffer |
getBodyMessageBuffer
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.nio.ByteBuffer |
inputBuffer
Direct buffer used for input. |
protected java.lang.String |
localAddr
The local Host address. |
protected java.lang.String |
localName
Local Host associated with the current connection. |
protected int |
localPort
Local port to which the socket is connected |
protected static org.apache.commons.logging.Log |
log
Logger. |
protected int |
maxPostSize
Max post size. |
protected java.nio.ByteBuffer |
outputBuffer
Direct buffer used for output. |
protected static java.nio.ByteBuffer |
pongMessageBuffer
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 java.lang.String |
remoteAddr
Remote Address associated with the current connection. |
protected java.lang.String |
remoteHost
Remote Host associated with the current connection. |
protected int |
remotePort
Remote port to which the socket is connected |
protected boolean |
replay
Replay read. |
protected Request |
request
Request object. |
protected AjpMessage |
requestHeaderMessage
Header message. |
protected Response |
response
Response object. |
protected AjpMessage |
responseHeaderMessage
Message used for response header composition. |
protected java.lang.String |
server
Allow a customized the server header for the tin-foil hat folks. |
protected static StringManager |
sm
The string manager for this package. |
protected long |
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 | |
AjpAprProcessor(int headerBufferSize,
AprEndpoint 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. |
int |
getMaxPostSize()
Return the maximum size of a POST which will be buffered in SSL mode. |
Request |
getRequest()
Get the request associated with this processor. |
java.lang.String |
getServer()
Get the server header name. |
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. |
boolean |
process(long socket)
Process pipelined HTTP requests using the specified input and output streams. |
protected boolean |
read(int n)
Read at least the specified amount of bytes, and place them in the input buffer. |
protected boolean |
readMessage(AjpMessage message,
boolean first,
boolean useAvailableData)
Read an AJP message. |
protected boolean |
readt(int n,
boolean useAvailableData)
Read at least the specified amount of bytes, and place them in the input buffer. |
boolean |
receive()
Receive a chunk of data. |
void |
recycle()
Recycle the processor. |
void |
setAdapter(Adapter adapter)
Set the associated adapter. |
void |
setMaxPostSize(int mps)
Set the maximum size of a POST which will be buffered in SSL mode. |
void |
setServer(java.lang.String server)
Set the server header name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.commons.logging.Log log
protected static StringManager sm
protected Adapter adapter
protected Request request
protected Response response
protected AjpMessage requestHeaderMessage
protected AjpMessage responseHeaderMessage
protected AjpMessage bodyMessage
protected MessageBytes bodyBytes
protected boolean started
protected boolean error
protected boolean expectation
protected boolean tomcatAuthentication
protected long socket
protected java.lang.String remoteAddr
protected java.lang.String remoteHost
protected java.lang.String localName
protected int localPort
protected int remotePort
protected java.lang.String localAddr
protected int maxPostSize
protected char[] hostNameC
protected AprEndpoint endpoint
protected java.lang.String server
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 java.nio.ByteBuffer outputBuffer
protected java.nio.ByteBuffer inputBuffer
protected static final java.nio.ByteBuffer getBodyMessageBuffer
protected static final java.nio.ByteBuffer pongMessageBuffer
protected static final byte[] endMessageArray
Constructor Detail |
public AjpAprProcessor(int headerBufferSize, AprEndpoint endpoint)
Method Detail |
public void setMaxPostSize(int mps)
public int getMaxPostSize()
public void setServer(java.lang.String server)
public java.lang.String getServer()
public Request getRequest()
public boolean process(long 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(int n) throws java.io.IOException
java.io.IOException
protected boolean readt(int n, boolean useAvailableData) throws java.io.IOException
java.io.IOException
public boolean receive() throws java.io.IOException
java.io.IOException
protected boolean readMessage(AjpMessage message, boolean first, boolean useAvailableData) throws java.io.IOException
first
- is true if the message is the first in the request, which
will cause a short duration blocking read
java.io.IOException
- any other failure, including incomplete readspublic void recycle()
protected void flush() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |