public interface AsyncWebRequest extends NativeWebRequest
NativeWebRequest
with methods for asynchronous request processing.REFERENCE_REQUEST, REFERENCE_SESSION, SCOPE_GLOBAL_SESSION, SCOPE_REQUEST, SCOPE_SESSION
Modifier and Type | Method and Description |
---|---|
void |
addCompletionHandler(java.lang.Runnable runnable)
Add a Runnable to be invoked when request processing completes.
|
void |
dispatch()
Dispatch the request to the container in order to resume processing after
concurrent execution in an application thread.
|
boolean |
isAsyncComplete()
Whether asynchronous processing has completed.
|
boolean |
isAsyncStarted()
Whether the request is in async mode following a call to
startAsync() . |
boolean |
isDispatched()
Whether the request was dispatched to the container in order to resume
processing after concurrent execution in an application thread.
|
void |
setTimeout(java.lang.Long timeout)
Set the time required for concurrent handling to complete.
|
void |
setTimeoutHandler(java.lang.Runnable runnable)
Set the handler to use when concurrent handling has timed out.
|
void |
startAsync()
Mark the start of asynchronous request processing so that when the main
processing thread exits, the response remains open for further processing
in another thread.
|
getNativeRequest, getNativeRequest, getNativeResponse, getNativeResponse
checkNotModified, checkNotModified, getContextPath, getDescription, getHeader, getHeaderNames, getHeaderValues, getLocale, getParameter, getParameterMap, getParameterNames, getParameterValues, getRemoteUser, getUserPrincipal, isSecure, isUserInRole
getAttribute, getAttributeNames, getSessionId, getSessionMutex, registerDestructionCallback, removeAttribute, resolveReference, setAttribute
void setTimeout(java.lang.Long timeout)
isAsyncStarted()
is true
.timeout
- amount of time in milliseconds; null
means no
timeout, i.e. rely on the default timeout of the container.void setTimeoutHandler(java.lang.Runnable runnable)
void startAsync()
java.lang.IllegalStateException
- if async processing has completed or is not supportedboolean isAsyncStarted()
startAsync()
.
Returns "false" if asynchronous processing never started, has completed,
or the request was dispatched for further processing.void dispatch()
boolean isDispatched()
void addCompletionHandler(java.lang.Runnable runnable)
boolean isAsyncComplete()