| Modifier and Type | Class and Description |
|---|---|
| protected class | AjpProcessor.
This class is an input buffer which will read its data from an input stream. |
| protected class | AjpProcessor.
This class is an output buffer which will write data to an output stream. |
| Modifier and Type | Field and Description |
|---|---|
| private final MessageBytes | bodyBytes
Body message. |
| private final AjpMessage | bodyMessage
Body message. |
| private long | bytesWritten
Bytes written to client for the current request. |
| private final MessageBytes | certificates
Byte chunk for certs. |
| private boolean | empty
Request body empty flag. |
| private static final byte[] | |
| private static final byte[] | endMessageArray
End message array. |
| private boolean | endOfStream
End of stream flag. |
| private boolean | first
First read. |
| private static final byte[] | flushMessageArray
Flush message array. |
| private final byte[] | getBodyMessageArray
GetBody message array. |
| private static final Set | |
| private static final Map | |
| private static final Log | |
| private final int | outputMaxChunkSize
AJP packet size. |
| private static final byte[] | pongMessageArray
Pong message array. |
| private final AbstractAjpProtocol | |
| private boolean | replay
Replay read. |
| private final AjpMessage | requestHeaderMessage
Header message. |
| private boolean | responseFinished
Finished response. |
| private final AjpMessage | responseMessage
Message used for response composition. |
| private int | responseMsgPos
Location of next write of the response message (used with non-blocking writes when the message may not be written in a single write). |
| private static final StringManager | sm
The string manager for this package.
|
| private boolean | swallowResponse
Should any response body be swallowed and not sent to the client. |
| private final MessageBytes | tmpMB
Temp message bytes used for processing. |
| private boolean | waitingForBodyMessage
Indicates that a 'get body chunk' message has been sent but the body chunk has not yet been received. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | ack(ContinueResponseTiming continueResponseTiming)
Implements abstract org.
|
| protected final int | |
| protected final void | disableSwallowRequest()
Implements abstract org.
|
| protected AbstractEndpoint. | dispatchEndRequest()
Implements abstract org. Perform any necessary clean-up processing if the dispatch resulted in the completion of processing for the current request. |
| protected void | dispatchNonBlockingRead()
Overrides org. Perform any necessary processing for a non-blocking read before dispatching to the adapter. |
| protected final void | finishResponse()
Implements abstract org. Finish AJP response. |
| protected final void | flush()
Implements abstract org. Callback to write data from the buffer. |
| protected boolean | flushBufferedWrite()
Implements abstract org. Flush any pending writes. |
| protected Log | |
| protected final boolean | getPopulateRequestAttributesFromSocket()
Overrides org. Processors that populate request attributes directly (e.g. AJP) should over-ride this method and return
|
| protected ServletConnection | getServletConnection()
Implements abstract org. Protocols must override this method and return an appropriate ServletConnection instance |
| private boolean | |
| protected final boolean | |
| protected final boolean | isRequestBodyFullyRead()
Implements abstract org.
|
| protected boolean | |
| public void | pause()
Implements org. Informs the processor that the underlying I/O layer has stopped accepting new connections. |
| protected void | populateHost()
Overrides org. Called when a host header is not present in the request (e.g. HTTP/1.0). |
| protected void | populatePort()
Overrides org. Called when a host header is not present or is empty in the request (e.g. HTTP/1.0). |
| protected final void | populateRequestAttributeRemoteHost()
Overrides org. Populate the remote host request attribute. |
| protected final void | populateSslRequestAttributes()
Overrides org. Populate the TLS related request attributes from the |
| private void | |
| protected final void | prepareResponse()
Implements abstract org. When committing the response, we have to validate the set of headers, as well as setup the response filters. |
| private boolean | Returns: true if the requested number of bytes were read else falseBuffer to read data into buf, int Start position pos, int The minimum number of bytes to read n, boolean If there is no data available to read when this method is called, should this call block until data
becomes available? block)Read at least the specified amount of bytes, and place them in the input buffer. |
| private boolean | Returns: true if the message has been read, false if no data was readThe message to populate message, boolean If there is no data available to read when this method is called, should this call block until
data becomes available? block)Read an AJP message. |
| private boolean | Returns: true if at least one body byte was read, otherwise falseIf there is no data available to read when this method is called, should this call block until data
becomes available? block)Read an AJP body message. |
| public void | recycle()
Overrides org. Implements org. Recycle the processor, ready for the next request which may be on the same connection or a different connection. |
| protected boolean | Returns: true if there is more data, false if not.true if this is blocking IOGet more request body data from the web server and store it in the internal buffer. |
| protected final void | |
| public AbstractEndpoint. | service(SocketWrapperBase<?>
The connection to process socket)Implements abstract org. Service a 'standard' HTTP request. |
| protected final void | setRequestBody(ByteChunk body)
Implements abstract org.
|
| protected final void | |
| private void |
| bodyBytes | back to summary |
|---|---|
| private final MessageBytes bodyBytes Body message. | |
| bodyMessage | back to summary |
|---|---|
| private final AjpMessage bodyMessage Body message. | |
| bytesWritten | back to summary |
|---|---|
| private long bytesWritten Bytes written to client for the current request. | |
| certificates | back to summary |
|---|---|
| private final MessageBytes certificates Byte chunk for certs. | |
| empty | back to summary |
|---|---|
| private boolean empty Request body empty flag. | |
| endAndCloseMessageArray | back to summary |
|---|---|
| private static final byte[] endAndCloseMessageArray | |
| endMessageArray | back to summary |
|---|---|
| private static final byte[] endMessageArray End message array. | |
| endOfStream | back to summary |
|---|---|
| private boolean endOfStream End of stream flag. | |
| first | back to summary |
|---|---|
| private boolean first First read. | |
| flushMessageArray | back to summary |
|---|---|
| private static final byte[] flushMessageArray Flush message array. | |
| getBodyMessageArray | back to summary |
|---|---|
| private final byte[] getBodyMessageArray GetBody message array. Not static like the other message arrays since the message varies with packetSize and that can vary per connector. | |
| iisTlsAttributes | back to summary |
|---|---|
| private static final Set<String> iisTlsAttributes | |
| jakartaAttributeMapping | back to summary |
|---|---|
| private static final Map<String, String> jakartaAttributeMapping | |
| log | back to summary |
|---|---|
| private static final Log log | |
| outputMaxChunkSize | back to summary |
|---|---|
| private final int outputMaxChunkSize AJP packet size. | |
| pongMessageArray | back to summary |
|---|---|
| private static final byte[] pongMessageArray Pong message array. | |
| protocol | back to summary |
|---|---|
| private final AbstractAjpProtocol<?> protocol | |
| replay | back to summary |
|---|---|
| private boolean replay Replay read. | |
| requestHeaderMessage | back to summary |
|---|---|
| private final 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. | |
| responseFinished | back to summary |
|---|---|
| private boolean responseFinished Finished response. | |
| responseMessage | back to summary |
|---|---|
| private final AjpMessage responseMessage Message used for response composition. | |
| responseMsgPos | back to summary |
|---|---|
| private int responseMsgPos Location of next write of the response message (used with non-blocking writes when the message may not be written in a single write). A value of -1 indicates that no message has been written to the buffer. | |
| sm | back to summary |
|---|---|
| private static final StringManager sm Hides org. The string manager for this package. | |
| swallowResponse | back to summary |
|---|---|
| private boolean swallowResponse Should any response body be swallowed and not sent to the client. | |
| tmpMB | back to summary |
|---|---|
| private final MessageBytes tmpMB Temp message bytes used for processing. | |
| waitingForBodyMessage | back to summary |
|---|---|
| private boolean waitingForBodyMessage Indicates that a 'get body chunk' message has been sent but the body chunk has not yet been received. | |
| AjpProcessor | back to summary |
|---|---|
| public AjpProcessor(AbstractAjpProtocol<?> protocol, Adapter adapter) | |
| ack | back to summary |
|---|---|
| protected final void ack(ContinueResponseTiming continueResponseTiming) Implements abstract org.
| |
| available | back to summary |
|---|---|
| protected final int available(boolean doRead) Implements abstract org.
| |
| disableSwallowRequest | back to summary |
|---|---|
| protected final void disableSwallowRequest() Implements abstract org.
| |
| dispatchEndRequest | back to summary |
|---|---|
| protected AbstractEndpoint. Implements abstract org. Doc from org. Perform any necessary clean-up processing if the dispatch resulted in the completion of processing for the current request.
| |
| dispatchNonBlockingRead | back to summary |
|---|---|
| protected void dispatchNonBlockingRead() Overrides org. Doc from org. Perform any necessary processing for a non-blocking read before dispatching to the adapter.
| |
| finishResponse | back to summary |
|---|---|
| protected final void finishResponse() throws IOException Implements abstract org. Finish AJP response.
| |
| flush | back to summary |
|---|---|
| protected final void flush() throws IOException Implements abstract org. Callback to write data from the buffer.
| |
| flushBufferedWrite | back to summary |
|---|---|
| protected boolean flushBufferedWrite() throws IOException Implements abstract org. Doc from org. Flush any pending writes. Used during non-blocking writes to flush any remaining data from a previous incomplete write.
| |
| getLog | back to summary |
|---|---|
| protected Log getLog() Implements abstract org.
| |
| getPopulateRequestAttributesFromSocket | back to summary |
|---|---|
| protected final boolean getPopulateRequestAttributesFromSocket() Overrides org. Doc from org. Processors that populate request attributes directly (e.g. AJP) should over-ride this method and return
| |
| getServletConnection | back to summary |
|---|---|
| protected ServletConnection getServletConnection() Implements abstract org. Doc from org. Protocols must override this method and return an appropriate ServletConnection instance
| |
| hasDataToWrite | back to summary |
|---|---|
| private boolean hasDataToWrite() | |
| isReadyForWrite | back to summary |
|---|---|
| protected final boolean isReadyForWrite() Implements abstract org.
| |
| isRequestBodyFullyRead | back to summary |
|---|---|
| protected final boolean isRequestBodyFullyRead() Implements abstract org.
| |
| isTrailerFieldsReady | back to summary |
|---|---|
| protected boolean isTrailerFieldsReady() Implements abstract org.
| |
| pause | back to summary |
|---|---|
| public void pause() Implements org. Doc from org. Informs the processor that the underlying I/O layer has stopped accepting new connections. This is primarily intended to enable processors that use multiplexed connections to prevent further 'streams' being added to an existing multiplexed connection.
| |
| populateHost | back to summary |
|---|---|
| protected void populateHost() Overrides org. Doc from org. Called when a host header is not present in the request (e.g. HTTP/1.0). It populates the server name with appropriate information. The source is expected to vary by protocol. The default implementation is a NO-OP. This implementation populates the server name from the local name provided by the AJP message.
| |
| populatePort | back to summary |
|---|---|
| protected void populatePort() Overrides org. Doc from org. Called when a host header is not present or is empty in the request (e.g. HTTP/1.0). It populates the server port with appropriate information. The source is expected to vary by protocol. The default implementation is a NO-OP. This implementation populates the server port from the local port provided by the AJP message.
| |
| populateRequestAttributeRemoteHost | back to summary |
|---|---|
| protected final void populateRequestAttributeRemoteHost() Overrides org. Doc from org. Populate the remote host request attribute. Processors (e.g. AJP) that populate this from an alternative source should override this method.
| |
| populateSslRequestAttributes | back to summary |
|---|---|
| protected final void populateSslRequestAttributes() Overrides org. Doc from org. Populate the TLS related request attributes from the
| |
| prepareRequest | back to summary |
|---|---|
| private void prepareRequest() After reading the request headers, we have to setup the request filters. | |
| prepareResponse | back to summary |
|---|---|
| protected final void prepareResponse() throws IOException Implements abstract org. When committing the response, we have to validate the set of headers, as well as setup the response filters.
| |
| read | back to summary |
|---|---|
| private boolean read(byte[] buf, int pos, int n, boolean block) throws IOException Read at least the specified amount of bytes, and place them in the input buffer. Note that if any data is available to read then this method will always block until at least the specified number of bytes have been read.
| |
| readMessage | back to summary |
|---|---|
| private boolean readMessage(AjpMessage message, boolean block) throws IOException Read an AJP message.
| |
| receive | back to summary |
|---|---|
| private boolean receive(boolean block) throws IOException Read an AJP body message. Used to read both the 'special' packet in ajp13 and to receive the data after we send a GET_BODY packet.
| |
| recycle | back to summary |
|---|---|
| public void recycle() Overrides org. Implements org. Doc from org. Recycle the processor, ready for the next request which may be on the same connection or a different connection.
| |
| refillReadBuffer | back to summary |
|---|---|
| protected boolean refillReadBuffer(boolean block) throws IOException Get more request body data from the web server and store it in the internal buffer.
| |
| registerReadInterest | back to summary |
|---|---|
| protected final void registerReadInterest() Implements abstract org.
| |
| service | back to summary |
|---|---|
| public AbstractEndpoint. Implements abstract org. Doc from org. Service a 'standard' HTTP request. This method is called for both new requests and for requests that have
partially read the HTTP request line or HTTP headers. Once the headers have been fully read this method is not
called again until there is a new HTTP request to process. Note that the request type may change during
processing which may result in one or more calls to
| |
| setRequestBody | back to summary |
|---|---|
| protected final void setRequestBody(ByteChunk body) Implements abstract org.
| |
| setSwallowResponse | back to summary |
|---|---|
| protected final void setSwallowResponse() Implements abstract org.
| |
| writeData | back to summary |
|---|---|
| private void writeData(ByteBuffer chunk) throws IOException | |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Implements org. Obtain an estimate of the number of bytes that can be read without blocking. |
| public int | doRead(ApplicationBufferHandler
ApplicationBufferHandler that provides the buffer to read data into. handler)Implements org. Read from the input stream into the ByteBuffer provided by the ApplicationBufferHandler. |
| SocketInputBuffer | back to summary |
|---|---|
| protected SocketInputBuffer() | |
| available | back to summary |
|---|---|
| public int available() Implements org. Doc from org. Obtain an estimate of the number of bytes that can be read without blocking. Typically, this will be the number of available bytes known to be buffered.
| |
| doRead | back to summary |
|---|---|
| public int doRead(ApplicationBufferHandler handler) throws IOException Implements org. Doc from org. Read from the input stream into the ByteBuffer provided by the ApplicationBufferHandler. Important Note the current model assumes that the protocol will 'own' the ByteBuffer and return a pointer to it.
| |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public int | doWrite(ByteBuffer
data to write chunk)Implements org. Write the given data to the response. |
| public long | getBytesWritten()
Implements org. Bytes written to the underlying socket. |
| SocketOutputBuffer | back to summary |
|---|---|
| protected SocketOutputBuffer() | |
| doWrite | back to summary |
|---|---|
| public int doWrite(ByteBuffer chunk) throws IOException Implements org. Doc from org. Write the given data to the response. The caller owns the chunks.
| |
| getBytesWritten | back to summary |
|---|---|
| public long getBytesWritten() Implements org. Doc from org. Bytes written to the underlying socket. This includes the effects of chunking, compression, etc.
| |