public class AjpProcessor extends AbstractProcessor
Modifier and Type | Class and Description |
---|---|
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.
|
adapter, asyncStateMachine, request, response, socketWrapper, sslSupport
Constructor and Description |
---|
AjpProcessor(AbstractAjpProtocol<?> protocol,
Adapter adapter) |
Modifier and Type | Method and Description |
---|---|
protected void |
ack() |
protected int |
available(boolean doRead) |
protected void |
disableSwallowRequest() |
protected AbstractEndpoint.Handler.SocketState |
dispatchEndRequest()
Perform any necessary clean-up processing if the dispatch resulted in the
completion of processing for the current request.
|
protected void |
dispatchNonBlockingRead()
Perform any necessary processing for a non-blocking read before
dispatching to the adapter.
|
protected void |
finishResponse()
Finish AJP response.
|
protected void |
flush()
Callback to write data from the buffer.
|
protected boolean |
flushBufferedWrite()
Flush any pending writes.
|
protected Log |
getLog() |
protected boolean |
getPopulateRequestAttributesFromSocket()
Processors that populate request attributes directly (e.g.
|
protected boolean |
isReady() |
protected boolean |
isRequestBodyFullyRead() |
protected boolean |
isTrailerFieldsReady() |
void |
pause()
Informs the processor that the underlying I/O layer has stopped accepting
new connections.
|
protected void |
populateRequestAttributeRemoteHost()
Populate the remote host request attribute.
|
protected void |
populateSslRequestAttributes()
Populate the TLS related request attributes from the
SSLSupport
instance associated with this processor. |
protected void |
prepareResponse()
When committing the response, we have to validate the set of headers, as
well as setup the response filters.
|
void |
recycle()
Recycle the processor, ready for the next request which may be on the
same connection or a different connection.
|
protected boolean |
refillReadBuffer(boolean block)
Get more request body data from the web server and store it in the
internal buffer.
|
protected void |
registerReadInterest() |
AbstractEndpoint.Handler.SocketState |
service(SocketWrapperBase<?> socket)
Service a 'standard' HTTP request.
|
protected void |
setRequestBody(ByteChunk body) |
protected void |
setSwallowResponse() |
action, asyncPostProcess, dispatch, doHttpUpgrade, doPush, execute, executeDispatches, getAdapter, getAsyncTimeout, getErrorState, getLeftoverInput, getRequest, getSocketWrapper, getUpgradeToken, isAsync, isPushSupported, isTrailerFieldsSupported, isUpgrade, processSocketEvent, setAsyncTimeout, setErrorState, setSocketWrapper, setSslSupport, sslReHandShake, timeoutAsync
addDispatch, clearDispatches, getIteratorAndClearDispatches, process
public AjpProcessor(AbstractAjpProtocol<?> protocol, Adapter adapter)
protected boolean flushBufferedWrite() throws IOException
AbstractProcessor
flushBufferedWrite
in class AbstractProcessor
true
if data remains to be flushed at the end of
methodIOException
- If an I/O error occurs while attempting to flush the
dataprotected void dispatchNonBlockingRead()
AbstractProcessor
dispatchNonBlockingRead
in class AbstractProcessor
protected AbstractEndpoint.Handler.SocketState dispatchEndRequest()
AbstractProcessor
dispatchEndRequest
in class AbstractProcessor
public AbstractEndpoint.Handler.SocketState service(SocketWrapperBase<?> socket) throws IOException
AbstractProcessorLight
AbstractProcessorLight.dispatch(SocketEvent)
. Requests may be pipe-lined.service
in class AbstractProcessorLight
socket
- The connection to processIOException
- If an I/O error occurs during the processing of the
requestpublic void recycle()
Processor
recycle
in interface Processor
recycle
in class AbstractProcessor
public void pause()
Processor
protected boolean refillReadBuffer(boolean block) throws IOException
block
- true
if this is blocking IOtrue
if there is more data,
false
if not.IOException
- An IO error occurredprotected final void prepareResponse() throws IOException
prepareResponse
in class AbstractProcessor
IOException
protected final void flush() throws IOException
flush
in class AbstractProcessor
IOException
protected final void finishResponse() throws IOException
finishResponse
in class AbstractProcessor
IOException
protected final void ack()
ack
in class AbstractProcessor
protected final int available(boolean doRead)
available
in class AbstractProcessor
protected final void setRequestBody(ByteChunk body)
setRequestBody
in class AbstractProcessor
protected final void setSwallowResponse()
setSwallowResponse
in class AbstractProcessor
protected final void disableSwallowRequest()
disableSwallowRequest
in class AbstractProcessor
protected final boolean getPopulateRequestAttributesFromSocket()
AbstractProcessor
false
.getPopulateRequestAttributesFromSocket
in class AbstractProcessor
true
if the SocketWrapper should be used to populate the
request attributes, otherwise false
.protected final void populateRequestAttributeRemoteHost()
AbstractProcessor
populateRequestAttributeRemoteHost
in class AbstractProcessor
protected final void populateSslRequestAttributes()
AbstractProcessor
SSLSupport
instance associated with this processor. Protocols that populate TLS
attributes from a different source (e.g. AJP) should override this
method.populateSslRequestAttributes
in class AbstractProcessor
protected final boolean isRequestBodyFullyRead()
isRequestBodyFullyRead
in class AbstractProcessor
protected final void registerReadInterest()
registerReadInterest
in class AbstractProcessor
protected final boolean isReady()
isReady
in class AbstractProcessor
protected boolean isTrailerFieldsReady()
isTrailerFieldsReady
in class AbstractProcessor
protected Log getLog()
getLog
in class AbstractProcessorLight
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.