AsyncContext, AsyncContextCallbackpublic class AsyncContextImpl extends java.lang.Object implements AsyncContext, AsyncContextCallback
| Modifier and Type | Field | Description |
|---|---|---|
protected static StringManager |
sm |
ASYNC_CONTEXT_PATH, ASYNC_MAPPING, ASYNC_PATH_INFO, ASYNC_QUERY_STRING, ASYNC_REQUEST_URI, ASYNC_SERVLET_PATH| Constructor | Description |
|---|---|
AsyncContextImpl(Request request) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addListener(AsyncListener listener) |
|
void |
addListener(AsyncListener listener,
ServletRequest servletRequest,
ServletResponse servletResponse) |
|
void |
complete() |
|
<T extends AsyncListener> |
createListener(java.lang.Class<T> clazz) |
|
void |
dispatch() |
|
void |
dispatch(java.lang.String path) |
|
void |
dispatch(ServletContext context,
java.lang.String path) |
|
protected void |
doInternalDispatch() |
|
void |
fireOnComplete() |
|
ServletRequest |
getRequest() |
|
ServletResponse |
getResponse() |
|
long |
getTimeout() |
Get the current.
|
boolean |
hasOriginalRequestAndResponse() |
|
boolean |
isStarted() |
|
void |
recycle() |
|
void |
setErrorState(java.lang.Throwable t,
boolean fireOnError) |
|
void |
setStarted(Context context,
ServletRequest request,
ServletResponse response,
boolean originalRequestResponse) |
|
void |
setTimeout(long timeout) |
Set the timeout.
|
void |
start(java.lang.Runnable run) |
|
boolean |
timeout() |
protected static final StringManager sm
public AsyncContextImpl(Request request)
public void complete()
complete in interface AsyncContextpublic void fireOnComplete()
fireOnComplete in interface AsyncContextCallbackpublic boolean timeout()
public void dispatch()
dispatch in interface AsyncContextpublic void dispatch(java.lang.String path)
dispatch in interface AsyncContextpath - The path to which the request/response should be dispatched
relative to the ServletContext from which this async
request was started.public void dispatch(ServletContext context, java.lang.String path)
dispatch in interface AsyncContextcontext - The ServletContext to which the request/response
should be dispatched.path - The path to which the request/response should be dispatched
relative to the specified ServletContext.public ServletRequest getRequest()
getRequest in interface AsyncContextpublic ServletResponse getResponse()
getResponse in interface AsyncContextpublic void start(java.lang.Runnable run)
start in interface AsyncContextpublic void addListener(AsyncListener listener)
addListener in interface AsyncContextpublic void addListener(AsyncListener listener, ServletRequest servletRequest, ServletResponse servletResponse)
addListener in interface AsyncContextpublic <T extends AsyncListener> T createListener(java.lang.Class<T> clazz) throws ServletException
createListener in interface AsyncContextServletExceptionpublic void recycle()
public boolean isStarted()
public void setStarted(Context context, ServletRequest request, ServletResponse response, boolean originalRequestResponse)
public boolean hasOriginalRequestAndResponse()
hasOriginalRequestAndResponse in interface AsyncContextprotected void doInternalDispatch()
throws ServletException,
java.io.IOException
ServletExceptionjava.io.IOExceptionpublic long getTimeout()
javax.servlet.AsyncContextgetTimeout in interface AsyncContextpublic void setTimeout(long timeout)
javax.servlet.AsyncContextsetTimeout in interface AsyncContexttimeout - The timeout in milliseconds. 0 or less indicates no
timeout.public void setErrorState(java.lang.Throwable t,
boolean fireOnError)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.