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.
|
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
ajpFlush
Send AJP flush packet when flushing.
|
adapter, asyncStateMachine, endpoint, hostNameC, request, response, socketWrapper, sslSupport, userDataHelper| Constructor and Description |
|---|
AjpProcessor(int packetSize,
AbstractEndpoint<?> endpoint) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ack(ContinueResponseTiming continueResponseTiming) |
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.
|
boolean |
getAjpFlush() |
String |
getClientCertProvider() |
int |
getKeepAliveTimeout() |
protected Log |
getLog() |
protected boolean |
getPopulateRequestAttributesFromSocket()
Processors that populate request attributes directly (e.g.
|
boolean |
getTomcatAuthentication() |
boolean |
getTomcatAuthorization() |
protected boolean |
isReadyForWrite() |
protected boolean |
isRequestBodyFullyRead() |
void |
pause()
Informs the processor that the underlying I/O layer has stopped accepting
new connections.
|
protected void |
populateHost()
Called when a host header is not present in the request (e.g.
|
protected void |
populatePort()
Called when a host header is not present or is empty in the request (e.g.
|
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.
|
void |
setAjpFlush(boolean ajpFlush) |
void |
setAllowedRequestAttributesPattern(Pattern allowedRequestAttributesPattern) |
void |
setClientCertProvider(String clientCertProvider) |
void |
setKeepAliveTimeout(int timeout) |
protected void |
setRequestBody(ByteChunk body) |
void |
setRequiredSecret(String requiredSecret)
Deprecated.
|
void |
setSecret(String secret) |
protected void |
setSwallowResponse() |
void |
setTomcatAuthentication(boolean tomcatAuthentication) |
void |
setTomcatAuthorization(boolean tomcatAuthorization) |
ack, action, asyncPostProcess, checkAsyncTimeoutGeneration, dispatch, doHttpUpgrade, doPush, executeDispatches, getAdapter, getAsyncTimeout, getConnectionID, getErrorState, getExecutor, getLeftoverInput, getRequest, getSocketWrapper, getStreamID, getUpgradeToken, isAsync, isPushSupported, isReadyForRead, isUpgrade, logAccess, parseHost, processSocketEvent, setAdapter, setAsyncTimeout, setErrorState, setSocketWrapper, setSslSupport, sslReHandShake, timeoutAsyncaddDispatch, clearDispatches, getIteratorAndClearDispatches, processprotected boolean ajpFlush
public AjpProcessor(int packetSize,
AbstractEndpoint<?> endpoint)
public boolean getAjpFlush()
public void setAjpFlush(boolean ajpFlush)
public int getKeepAliveTimeout()
public void setKeepAliveTimeout(int timeout)
public boolean getTomcatAuthentication()
public void setTomcatAuthentication(boolean tomcatAuthentication)
public boolean getTomcatAuthorization()
public void setTomcatAuthorization(boolean tomcatAuthorization)
@Deprecated public void setRequiredSecret(String requiredSecret)
public void setSecret(String secret)
public String getClientCertProvider()
public void setClientCertProvider(String clientCertProvider)
public void setAllowedRequestAttributesPattern(Pattern allowedRequestAttributesPattern)
protected boolean flushBufferedWrite()
throws IOException
AbstractProcessorflushBufferedWrite in class AbstractProcessortrue 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()
AbstractProcessordispatchNonBlockingRead in class AbstractProcessorprotected AbstractEndpoint.Handler.SocketState dispatchEndRequest()
AbstractProcessordispatchEndRequest in class AbstractProcessorpublic AbstractEndpoint.Handler.SocketState service(SocketWrapperBase<?> socket) throws IOException
AbstractProcessorLightAbstractProcessorLight.dispatch(SocketEvent). Requests may be pipe-lined.service in class AbstractProcessorLightsocket - The connection to processIOException - If an I/O error occurs during the processing of the
requestpublic void recycle()
Processorrecycle in interface Processorrecycle in class AbstractProcessorpublic void pause()
Processorprotected 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 void populateHost()
The default implementation is a NO-OP.
This implementation populates the server name from the local name provided by the AJP message.
populateHost in class AbstractProcessorprotected void populatePort()
The default implementation is a NO-OP.
This implementation populates the server port from the local port provided by the AJP message.
populatePort in class AbstractProcessorprotected final void prepareResponse()
throws IOException
prepareResponse in class AbstractProcessorIOExceptionprotected final void flush()
throws IOException
flush in class AbstractProcessorIOExceptionprotected final void finishResponse()
throws IOException
finishResponse in class AbstractProcessorIOExceptionprotected final void ack(ContinueResponseTiming continueResponseTiming)
ack in class AbstractProcessorprotected final int available(boolean doRead)
available in class AbstractProcessorprotected final void setRequestBody(ByteChunk body)
setRequestBody in class AbstractProcessorprotected final void setSwallowResponse()
setSwallowResponse in class AbstractProcessorprotected final void disableSwallowRequest()
disableSwallowRequest in class AbstractProcessorprotected final boolean getPopulateRequestAttributesFromSocket()
AbstractProcessorfalse.getPopulateRequestAttributesFromSocket in class AbstractProcessortrue if the SocketWrapper should be used to populate the
request attributes, otherwise false.protected final void populateRequestAttributeRemoteHost()
AbstractProcessorpopulateRequestAttributeRemoteHost in class AbstractProcessorprotected final void populateSslRequestAttributes()
AbstractProcessorSSLSupport
instance associated with this processor. Protocols that populate TLS
attributes from a different source (e.g. AJP) should override this
method.populateSslRequestAttributes in class AbstractProcessorprotected final boolean isRequestBodyFullyRead()
isRequestBodyFullyRead in class AbstractProcessorprotected final void registerReadInterest()
registerReadInterest in class AbstractProcessorprotected final boolean isReadyForWrite()
isReadyForWrite in class AbstractProcessorprotected Log getLog()
getLog in class AbstractProcessorLightCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.