public class StreamProcessor extends AbstractProcessor implements Runnable
adapter, asyncStateMachine, endpoint, request, response, socketWrapper, sslSupport
Constructor and Description |
---|
StreamProcessor(Http2UpgradeHandler handler,
Stream stream,
Adapter adapter,
SocketWrapperBase<?> socketWrapper) |
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 |
doPush(PushToken pushToken)
Process a push.
|
protected void |
executeDispatches(SocketWrapperBase<?> wrapper) |
protected void |
finishResponse() |
protected void |
flush() |
protected boolean |
flushBufferedWrite()
Flush any pending writes.
|
protected Log |
getLog() |
protected boolean |
isPushSupported()
Protocols that support push should override this method and return
true . |
protected boolean |
isReady() |
protected boolean |
isRequestBodyFullyRead() |
void |
pause()
Informs the processor that the underlying I/O layer has stopped accepting
new connections.
|
protected void |
prepareResponse() |
void |
recycle()
Recycle the processor, ready for the next request which may be on the
same connection or a different connection.
|
protected void |
registerReadInterest() |
void |
run() |
AbstractEndpoint.Handler.SocketState |
service(SocketWrapperBase<?> socket)
Service a 'standard' HTTP request.
|
protected void |
setRequestBody(ByteChunk body) |
protected void |
setSwallowResponse() |
action, asyncPostProcess, dispatch, dispatchNonBlockingRead, doHttpUpgrade, getAdapter, getAsyncTimeout, getErrorState, getExecutor, getLeftoverInput, getMaxCookieCount, getPopulateRequestAttributesFromSocket, getRequest, getSocketWrapper, getUpgradeToken, isAsync, isUpgrade, populateRequestAttributeRemoteHost, populateSslRequestAttributes, setAdapter, setAsyncTimeout, setErrorState, setMaxCookieCount, setSocketWrapper, setSslSupport, sslReHandShake, timeoutAsync
addDispatch, clearDispatches, getIteratorAndClearDispatches, process
public StreamProcessor(Http2UpgradeHandler handler, Stream stream, Adapter adapter, SocketWrapperBase<?> socketWrapper)
protected final void prepareResponse() throws IOException
prepareResponse
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 void flush() throws IOException
flush
in class AbstractProcessor
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 boolean isRequestBodyFullyRead()
isRequestBodyFullyRead
in class AbstractProcessor
protected final void registerReadInterest()
registerReadInterest
in class AbstractProcessor
protected final boolean isReady()
isReady
in class AbstractProcessor
protected final void executeDispatches(SocketWrapperBase<?> wrapper)
executeDispatches
in class AbstractProcessor
protected final boolean isPushSupported()
AbstractProcessor
true
.isPushSupported
in class AbstractProcessor
true
if push is supported by this processor, otherwise
false
.protected final void doPush(PushToken pushToken)
AbstractProcessor
doPush
in class AbstractProcessor
pushToken
- Contains all the information necessary for the Processor
to process the push requestpublic void recycle()
Processor
recycle
in interface Processor
recycle
in class AbstractProcessor
protected Log getLog()
getLog
in class AbstractProcessorLight
public void pause()
Processor
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
requestprotected 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 AbstractEndpoint.Handler.SocketState dispatchEndRequest()
AbstractProcessor
dispatchEndRequest
in class AbstractProcessor
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.