public class Http11Processor extends AbstractProcessor
adapter, asyncStateMachine, request, response, socketWrapper, sslSupport, userDataHelper
Constructor and Description |
---|
Http11Processor(AbstractHttp11Protocol<?> 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 |
doHttpUpgrade(UpgradeToken upgradeToken)
Process an HTTP upgrade.
|
protected void |
finishResponse() |
protected void |
flush() |
protected boolean |
flushBufferedWrite()
Flush any pending writes.
|
java.nio.ByteBuffer |
getLeftoverInput()
Allows retrieving additional input during the upgrade process.
|
protected Log |
getLog() |
UpgradeToken |
getUpgradeToken()
Generate an upgrade token.
|
protected boolean |
isReady() |
protected boolean |
isRequestBodyFullyRead() |
protected boolean |
isTrailerFieldsReady() |
protected boolean |
isTrailerFieldsSupported()
Protocols that support trailer fields should override this method and
return
true . |
boolean |
isUpgrade()
Processors that implement HTTP upgrade must override this method.
|
void |
pause()
Informs the processor that the underlying I/O layer has stopped accepting
new connections.
|
protected void |
populateHost()
Called when a host name is not present in the request (e.g.
|
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 void |
registerReadInterest() |
AbstractEndpoint.Handler.SocketState |
service(SocketWrapperBase<?> socketWrapper)
Service a 'standard' HTTP request.
|
protected void |
setRequestBody(ByteChunk body) |
protected void |
setSwallowResponse() |
protected void |
sslReHandShake()
Processors that can perform a TLS re-handshake (e.g.
|
action, asyncPostProcess, checkAsyncTimeoutGeneration, dispatch, dispatchNonBlockingRead, doPush, execute, executeDispatches, getAdapter, getAsyncTimeout, getErrorState, getPopulateRequestAttributesFromSocket, getRequest, getSocketWrapper, isAsync, isPushSupported, parseHost, populateRequestAttributeRemoteHost, populateSslRequestAttributes, processSocketEvent, setAsyncTimeout, setErrorState, setSocketWrapper, setSslSupport, timeoutAsync
addDispatch, clearDispatches, getIteratorAndClearDispatches, process
public Http11Processor(AbstractHttp11Protocol<?> protocol, Adapter adapter)
public AbstractEndpoint.Handler.SocketState service(SocketWrapperBase<?> socketWrapper) throws java.io.IOException
AbstractProcessorLight
AbstractProcessorLight.dispatch(SocketEvent)
. Requests may be pipe-lined.service
in class AbstractProcessorLight
socketWrapper
- The connection to processjava.io.IOException
- If an I/O error occurs during the processing of the
requestprotected final void prepareResponse() throws java.io.IOException
prepareResponse
in class AbstractProcessor
java.io.IOException
protected void populateHost()
The default implementation is a NO-OP.
This implementation provides the server name from the default host and the server port from the local port.
populateHost
in class AbstractProcessor
protected boolean flushBufferedWrite() throws java.io.IOException
AbstractProcessor
flushBufferedWrite
in class AbstractProcessor
true
if data remains to be flushed at the end of
methodjava.io.IOException
- If an I/O error occurs while attempting to flush the
dataprotected AbstractEndpoint.Handler.SocketState dispatchEndRequest()
AbstractProcessor
dispatchEndRequest
in class AbstractProcessor
protected Log getLog()
getLog
in class AbstractProcessorLight
protected final void finishResponse() throws java.io.IOException
finishResponse
in class AbstractProcessor
java.io.IOException
protected final void ack()
ack
in class AbstractProcessor
protected final void flush() throws java.io.IOException
flush
in class AbstractProcessor
java.io.IOException
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 void sslReHandShake() throws java.io.IOException
AbstractProcessor
sslReHandShake
in class AbstractProcessor
java.io.IOException
- If authentication is required then there will be I/O
with the client and this exception will be thrown if
that goes wrongprotected final boolean isRequestBodyFullyRead()
isRequestBodyFullyRead
in class AbstractProcessor
protected final void registerReadInterest()
registerReadInterest
in class AbstractProcessor
protected final boolean isReady()
isReady
in class AbstractProcessor
public UpgradeToken getUpgradeToken()
AbstractProcessor
getUpgradeToken
in interface Processor
getUpgradeToken
in class AbstractProcessor
protected final void doHttpUpgrade(UpgradeToken upgradeToken)
AbstractProcessor
doHttpUpgrade
in class AbstractProcessor
upgradeToken
- Contains all the information necessary for the
Processor to process the upgradepublic java.nio.ByteBuffer getLeftoverInput()
AbstractProcessor
getLeftoverInput
in interface Processor
getLeftoverInput
in class AbstractProcessor
public boolean isUpgrade()
AbstractProcessor
isUpgrade
in interface Processor
isUpgrade
in class AbstractProcessor
true
if the Processor is currently processing an upgrade
request, otherwise false
protected boolean isTrailerFieldsReady()
isTrailerFieldsReady
in class AbstractProcessor
protected boolean isTrailerFieldsSupported()
AbstractProcessor
true
.isTrailerFieldsSupported
in class AbstractProcessor
true
if trailer fields are supported by this processor,
otherwise false
.public final void recycle()
Processor
recycle
in interface Processor
recycle
in class AbstractProcessor
public void pause()
Processor
Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.