org.apache.coyote.ajp
public class AjpAprProcessor extends Object implements ActionHook
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 | finished
Finished response. |
protected boolean | first
First read. |
protected static ByteBuffer | flushMessageBuffer
Direct buffer used for sending explicit flush message. |
protected 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 ByteBuffer | inputBuffer
Direct buffer used for input. |
protected static Log | log
Logger. |
protected ByteBuffer | outputBuffer
Direct buffer used for output. |
protected int | packetSize
The socket timeout used when reading the first block of the request
header. |
protected static ByteBuffer | pongMessageBuffer
Direct buffer used for sending right away a pong message. |
protected boolean | replay
Replay read. |
protected Request | request
Request object. |
protected AjpMessage | requestHeaderMessage
Header message. |
protected 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 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 packetSize, AprEndpoint endpoint) |
Method Summary | |
---|---|
void | action(ActionCode actionCode, 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.
|
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. |
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 | setRequiredSecret(String requiredSecret) |
void | setTomcatAuthentication(boolean tomcatAuthentication) |
Parameters: actionCode Type of the action param Action parameter
Returns: the associated adapter
Returns: The request
Throws: IOException error during an I/O operation
Parameters: first is true if the message is the first in the request, which will cause a short duration blocking read
Returns: true if the message has been read, false if the short read didn't return anything
Throws: IOException any other failure, including incomplete reads
Parameters: adapter the new adapter