public class StreamProcessor extends AbstractProcessor implements Runnable
adapter, asyncStateMachine, endpoint, request, response, socketWrapper
Constructor and Description |
---|
StreamProcessor(Stream stream,
Adapter adapter,
SocketWrapperBase<?> socketWrapper) |
Modifier and Type | Method and Description |
---|---|
void |
action(ActionCode actionCode,
Object param)
Send an action to the connector.
|
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 boolean |
flushBufferedWrite()
Flush any pending writes.
|
ByteBuffer |
getLeftoverInput()
Allows retrieving additional input during the upgrade process
|
protected Log |
getLog() |
UpgradeToken |
getUpgradeToken() |
boolean |
isUpgrade() |
void |
pause()
Informs the processor that the underlying I/O layer has stopped accepting
new connections.
|
void |
recycle()
Recycle the processor, ready for the next request which may be on the
same connection or a different connection.
|
void |
run() |
AbstractEndpoint.Handler.SocketState |
service(SocketWrapperBase<?> socket)
Service a 'standard' HTTP request.
|
asyncPostProcess, dispatch, dispatchNonBlockingRead, getAdapter, getAsyncTimeout, getErrorState, getExecutor, getRequest, getSocketWrapper, isAsync, setAdapter, setAsyncTimeout, setErrorState, setSocketWrapper, setSslSupport, timeoutAsync
addDispatch, clearDispatches, getIteratorAndClearDispatches, process
public StreamProcessor(Stream stream, Adapter adapter, SocketWrapperBase<?> socketWrapper)
public void action(ActionCode actionCode, Object param)
ActionHook
action
in interface ActionHook
actionCode
- Type of the actionparam
- Action parameterpublic 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
public UpgradeToken getUpgradeToken()
getUpgradeToken
in interface Processor
public ByteBuffer getLeftoverInput()
Processor
getLeftoverInput
in interface Processor
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.