public interface AsyncContext
Modifier and Type | Field and Description |
---|---|
static String |
ASYNC_CONTEXT_PATH |
static String |
ASYNC_PATH_INFO |
static String |
ASYNC_QUERY_STRING |
static String |
ASYNC_REQUEST_URI |
static String |
ASYNC_SERVLET_PATH |
Modifier and Type | Method and Description |
---|---|
void |
addListener(AsyncListener listener) |
void |
addListener(AsyncListener listener,
ServletRequest request,
ServletResponse response) |
void |
complete() |
<T extends AsyncListener> |
createListener(Class<T> clazz) |
void |
dispatch() |
void |
dispatch(ServletContext context,
String path) |
void |
dispatch(String path) |
ServletRequest |
getRequest() |
ServletResponse |
getResponse() |
long |
getTimeout()
Get the current timeout.
|
boolean |
hasOriginalRequestAndResponse() |
void |
setTimeout(long timeout)
Set the timeout.
|
void |
start(Runnable run) |
static final String ASYNC_REQUEST_URI
static final String ASYNC_CONTEXT_PATH
static final String ASYNC_PATH_INFO
static final String ASYNC_SERVLET_PATH
static final String ASYNC_QUERY_STRING
ServletRequest getRequest()
ServletResponse getResponse()
boolean hasOriginalRequestAndResponse()
void dispatch()
IllegalStateException
- if this method is called when the request
is not in asynchronous mode. The request is in asynchronous mode after
ServletRequest.startAsync()
or
ServletRequest.startAsync(ServletRequest,
ServletResponse)
has been called and before complete()
or any
other dispatch() method has been called.void dispatch(String path)
path
- The path to which the request/response should be dispatched
relative to the ServletContext
from which this async
request was started.IllegalStateException
- if this method is called when the request
is not in asynchronous mode. The request is in asynchronous mode after
ServletRequest.startAsync()
or
ServletRequest.startAsync(ServletRequest,
ServletResponse)
has been called and before complete()
or any
other dispatch() method has been called.void dispatch(ServletContext context, String path)
path
- The path to which the request/response should be dispatched
relative to the specified ServletContext
.context
- The ServletContext
to which the request/response
should be dispatched.IllegalStateException
- if this method is called when the request
is not in asynchronous mode. The request is in asynchronous mode after
ServletRequest.startAsync()
or
ServletRequest.startAsync(ServletRequest,
ServletResponse)
has been called and before complete()
or any
other dispatch() method has been called.void complete()
void start(Runnable run)
void addListener(AsyncListener listener)
void addListener(AsyncListener listener, ServletRequest request, ServletResponse response)
<T extends AsyncListener> T createListener(Class<T> clazz) throws ServletException
ServletException
void setTimeout(long timeout)
timeout
- The timeout in milliseconds. 0 or less indicates no
timeout.long getTimeout()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.