public class AsyncServletServerHttpRequest extends ServletServerHttpRequest implements AsyncServerHttpRequest, AsyncListener
FORM_CHARSET, FORM_CONTENT_TYPE| Constructor and Description |
|---|
AsyncServletServerHttpRequest(HttpServletRequest request,
HttpServletResponse response)
Create a new instance for the given request/response pair.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCompletionHandler(java.lang.Runnable runnable) |
void |
addTimeoutHandler(java.lang.Runnable timeoutHandler) |
void |
completeAsync() |
boolean |
isAsyncCompleted()
Whether async request processing has completed.
|
boolean |
isAsyncStarted() |
void |
onComplete(AsyncEvent event) |
void |
onError(AsyncEvent event) |
void |
onStartAsync(AsyncEvent event) |
void |
onTimeout(AsyncEvent event) |
void |
setTimeout(long timeout)
Timeout period begins after the container thread has exited.
|
void |
startAsync() |
getBody, getCookies, getHeaders, getMethod, getPrincipal, getQueryParams, getRemoteAddress, getRemoteHostName, getServletRequest, getURIclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPrincipal, getQueryParams, getRemoteAddress, getRemoteHostNamegetMethod, getURIgetBodygetCookies, getHeaderspublic AsyncServletServerHttpRequest(HttpServletRequest request, HttpServletResponse response)
public void setTimeout(long timeout)
setTimeout in interface AsyncServerHttpRequestpublic void addTimeoutHandler(java.lang.Runnable timeoutHandler)
public void addCompletionHandler(java.lang.Runnable runnable)
public boolean isAsyncStarted()
isAsyncStarted in interface AsyncServerHttpRequestpublic boolean isAsyncCompleted()
It is important to avoid use of request and response objects after async processing has completed. Servlet containers often re-use them.
isAsyncCompleted in interface AsyncServerHttpRequestpublic void startAsync()
startAsync in interface AsyncServerHttpRequestpublic void completeAsync()
completeAsync in interface AsyncServerHttpRequestpublic void onStartAsync(AsyncEvent event) throws java.io.IOException
onStartAsync in interface AsyncListenerjava.io.IOExceptionpublic void onError(AsyncEvent event) throws java.io.IOException
onError in interface AsyncListenerjava.io.IOExceptionpublic void onTimeout(AsyncEvent event) throws java.io.IOException
onTimeout in interface AsyncListenerjava.io.IOExceptionpublic void onComplete(AsyncEvent event) throws java.io.IOException
onComplete in interface AsyncListenerjava.io.IOException