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, getURI
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPrincipal, getQueryParams, getRemoteAddress, getRemoteHostName
getMethod, getURI
getBody
getCookies, getHeaders
public AsyncServletServerHttpRequest(HttpServletRequest request, HttpServletResponse response)
public void setTimeout(long timeout)
setTimeout
in interface AsyncServerHttpRequest
public void addTimeoutHandler(java.lang.Runnable timeoutHandler)
public void addCompletionHandler(java.lang.Runnable runnable)
public boolean isAsyncStarted()
isAsyncStarted
in interface AsyncServerHttpRequest
public 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 AsyncServerHttpRequest
public void startAsync()
startAsync
in interface AsyncServerHttpRequest
public void completeAsync()
completeAsync
in interface AsyncServerHttpRequest
public void onStartAsync(AsyncEvent event) throws java.io.IOException
onStartAsync
in interface AsyncListener
java.io.IOException
public void onError(AsyncEvent event) throws java.io.IOException
onError
in interface AsyncListener
java.io.IOException
public void onTimeout(AsyncEvent event) throws java.io.IOException
onTimeout
in interface AsyncListener
java.io.IOException
public void onComplete(AsyncEvent event) throws java.io.IOException
onComplete
in interface AsyncListener
java.io.IOException