public interface AsyncContext
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ASYNC_CONTEXT_PATH |
static java.lang.String |
ASYNC_PATH_INFO |
static java.lang.String |
ASYNC_QUERY_STRING |
static java.lang.String |
ASYNC_REQUEST_URI |
static java.lang.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(java.lang.Class<T> clazz) |
void |
dispatch() |
void |
dispatch(ServletContext context,
java.lang.String path) |
void |
dispatch(java.lang.String path) |
ServletRequest |
getRequest() |
ServletResponse |
getResponse() |
long |
getTimeout()
Get the current.
|
boolean |
hasOriginalRequestAndResponse() |
void |
setTimeout(long timeout)
Set the timeout.
|
void |
start(java.lang.Runnable run) |
static final java.lang.String ASYNC_REQUEST_URI
static final java.lang.String ASYNC_CONTEXT_PATH
static final java.lang.String ASYNC_PATH_INFO
static final java.lang.String ASYNC_SERVLET_PATH
static final java.lang.String ASYNC_QUERY_STRING
ServletRequest getRequest()
ServletResponse getResponse()
boolean hasOriginalRequestAndResponse()
void dispatch()
java.lang.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(java.lang.String path)
path
- The path to which the request/response should be dispatched
relative to the ServletContext
from which this async
request was started.java.lang.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, java.lang.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.java.lang.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(java.lang.Runnable run)
void addListener(AsyncListener listener)
void addListener(AsyncListener listener, ServletRequest request, ServletResponse response)
<T extends AsyncListener> T createListener(java.lang.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-2016 Apache Software Foundation. All Rights Reserved.