public interface Processor
Modifier and Type | Method and Description |
---|---|
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 |
pause()
Informs the processor that the underlying I/O layer has stopped accepting
new connections.
|
AbstractEndpoint.Handler.SocketState |
process(SocketWrapperBase<?> socketWrapper,
SocketEvent status)
Process a connection.
|
void |
recycle()
Recycle the processor, ready for the next request which may be on the
same connection or a different connection.
|
void |
setSslSupport(SSLSupport sslSupport)
Set the SSL information for this HTTP connection.
|
void |
timeoutAsync(long now)
Check this processor to see if the timeout has expired and process a
timeout if that is that case.
|
AbstractEndpoint.Handler.SocketState process(SocketWrapperBase<?> socketWrapper, SocketEvent status) throws IOException
socketWrapper
- The connection to processstatus
- The status of the connection that triggered this additional
processingIOException
- If an I/O error occurs during the processing of the
requestUpgradeToken getUpgradeToken()
IllegalStateException
- if this is called on a Processor that does
not support upgradingboolean isUpgrade()
true
if the Processor is currently processing an upgrade
request, otherwise false
boolean isAsync()
void timeoutAsync(long now)
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.
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.Request getRequest()
void recycle()
void setSslSupport(SSLSupport sslSupport)
sslSupport
- The SSL support object to use for this connectionByteBuffer getLeftoverInput()
IllegalStateException
- if this is called on a Processor that does
not support upgradingvoid pause()
boolean checkAsyncTimeoutGeneration()
true
If the async generation has not changed since the
async timeout was triggeredCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.