public abstract class UpgradeProcessorBase extends AbstractProcessorLight implements WebConnection
Modifier and Type | Field and Description |
---|---|
protected static int |
INFINITE_TIMEOUT |
Constructor and Description |
---|
UpgradeProcessorBase(UpgradeToken upgradeToken) |
Modifier and Type | Method and Description |
---|---|
AbstractEndpoint.Handler.SocketState |
asyncPostProcess() |
boolean |
checkAsyncTimeoutGeneration()
Check to see if the async generation (each cycle of async increments the
generation of the AsyncStateMachine) is the same as the generation when
the most recent async timeout was triggered.
|
ByteBuffer |
getLeftoverInput()
Allows retrieving additional input during the upgrade process.
|
Request |
getRequest() |
UpgradeToken |
getUpgradeToken()
Generate an upgrade token.
|
boolean |
isAsync() |
boolean |
isUpgrade() |
void |
recycle()
Recycle the processor, ready for the next request which may be on the
same connection or a different connection.
|
AbstractEndpoint.Handler.SocketState |
service(SocketWrapperBase<?> socketWrapper)
Service a 'standard' HTTP request.
|
void |
timeoutAsync(long now)
Check this processor to see if the timeout has expired and process a
timeout if that is that case.
|
addDispatch, clearDispatches, dispatch, getIteratorAndClearDispatches, getLog, logAccess, process
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputStream, getOutputStream
close
pause, setSslSupport
protected static final int INFINITE_TIMEOUT
public UpgradeProcessorBase(UpgradeToken upgradeToken)
public final boolean isUpgrade()
public UpgradeToken getUpgradeToken()
Processor
getUpgradeToken
in interface Processor
public final void recycle()
Processor
public final AbstractEndpoint.Handler.SocketState service(SocketWrapperBase<?> socketWrapper) throws IOException
AbstractProcessorLight
AbstractProcessorLight.dispatch(SocketEvent)
. Requests may be pipe-lined.service
in class AbstractProcessorLight
socketWrapper
- The connection to processIOException
- If an I/O error occurs during the processing of the
requestpublic final AbstractEndpoint.Handler.SocketState asyncPostProcess()
asyncPostProcess
in class AbstractProcessorLight
public final Request getRequest()
getRequest
in interface Processor
public ByteBuffer getLeftoverInput()
Processor
getLeftoverInput
in interface Processor
public boolean checkAsyncTimeoutGeneration()
Processor
checkAsyncTimeoutGeneration
in interface Processor
true
If the async generation has not changed since the
async timeout was triggeredpublic void timeoutAsync(long now)
Processor
Note: The name of this method originated with the Servlet 3.0 asynchronous processing but evolved over time to represent a timeout that is triggered independently of the socket read/write timeouts.
timeoutAsync
in interface Processor
now
- The time (as returned by System.currentTimeMillis()
to
use as the current time to determine whether the timeout has
expired. If negative, the timeout will always be treated as ifq
it has expired.Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.