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.
|
ByteBuffer |
getLeftoverInput()
Allows retrieving additional input during the upgrade process.
|
protected Log |
getLog() |
UpgradeToken |
getUpgradeToken()
Generate an upgrade token.
|
protected boolean |
isReadyForWrite() |
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 |
populatePort()
Called when a host header is not present or is empty 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 |
setSocketWrapper(SocketWrapperBase<?> socketWrapper)
Set the socket wrapper being used.
|
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, isReadyForRead, logAccess, parseHost, populateHost, populateRequestAttributeRemoteHost, populateSslRequestAttributes, processSocketEvent, setAsyncTimeout, setErrorState, setSslSupport, timeoutAsyncaddDispatch, clearDispatches, getIteratorAndClearDispatches, processpublic Http11Processor(AbstractHttp11Protocol<?> protocol, Adapter adapter)
public AbstractEndpoint.Handler.SocketState service(SocketWrapperBase<?> socketWrapper) throws IOException
AbstractProcessorLightAbstractProcessorLight.dispatch(SocketEvent). Requests may be pipe-lined.service in class AbstractProcessorLightsocketWrapper - The connection to processIOException - If an I/O error occurs during the processing of the
requestprotected final void setSocketWrapper(SocketWrapperBase<?> socketWrapper)
AbstractProcessorsetSocketWrapper in class AbstractProcessorsocketWrapper - The socket wrapperprotected final void prepareResponse()
throws IOException
prepareResponse in class AbstractProcessorIOExceptionprotected void populatePort()
The default implementation is a NO-OP.
This implementation provides the server port from the local port.
populatePort in class AbstractProcessorprotected 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 AbstractEndpoint.Handler.SocketState dispatchEndRequest()
AbstractProcessordispatchEndRequest in class AbstractProcessorprotected Log getLog()
getLog in class AbstractProcessorLightprotected final void finishResponse()
throws IOException
finishResponse in class AbstractProcessorIOExceptionprotected final void ack()
ack in class AbstractProcessorprotected final void flush()
throws IOException
flush in class AbstractProcessorIOExceptionprotected 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 void sslReHandShake()
throws IOException
AbstractProcessorsslReHandShake in class AbstractProcessorIOException - 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 AbstractProcessorprotected final void registerReadInterest()
registerReadInterest in class AbstractProcessorprotected final boolean isReadyForWrite()
isReadyForWrite in class AbstractProcessorpublic UpgradeToken getUpgradeToken()
AbstractProcessorgetUpgradeToken in interface ProcessorgetUpgradeToken in class AbstractProcessorprotected final void doHttpUpgrade(UpgradeToken upgradeToken)
AbstractProcessordoHttpUpgrade in class AbstractProcessorupgradeToken - Contains all the information necessary for the
Processor to process the upgradepublic ByteBuffer getLeftoverInput()
AbstractProcessorgetLeftoverInput in interface ProcessorgetLeftoverInput in class AbstractProcessorpublic boolean isUpgrade()
AbstractProcessorisUpgrade in interface ProcessorisUpgrade in class AbstractProcessortrue if the Processor is currently processing an upgrade
request, otherwise falseprotected boolean isTrailerFieldsReady()
isTrailerFieldsReady in class AbstractProcessorprotected boolean isTrailerFieldsSupported()
AbstractProcessortrue.isTrailerFieldsSupported in class AbstractProcessortrue if trailer fields are supported by this processor,
otherwise false.public final void recycle()
Processorrecycle in interface Processorrecycle in class AbstractProcessorpublic void pause()
ProcessorCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.