DefaultAsyncContext
public interface AsyncContext
Modifier and Type | Field | Description |
---|---|---|
static String |
ASYNC_CONTEXT_PATH |
Defines the ASYNC_CONTEXT_PATH constant.
|
static String |
ASYNC_MAPPING |
Defines the ASYNC_MAPPING constant.
|
static String |
ASYNC_PATH_INFO |
Defines the ASYNC_PATH_INFO constant.
|
static String |
ASYNC_QUERY_STRING |
Defines the ASYNC_QUERY_STRING constant.
|
static String |
ASYNC_REQUEST_URI |
Defines the ASYNC_REQUEST_URI constant.
|
static String |
ASYNC_SERVLET_PATH |
Define the ASYNC_SERVLET_PATH constant.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addListener(AsyncListener listener) |
Add the async listener.
|
void |
addListener(AsyncListener listener,
ServletRequest servletRequest,
ServletResponse servletResponse) |
Add the async listener.
|
void |
complete() |
Complete the request.
|
<T extends AsyncListener> |
createListener(Class<T> clazz) |
Create the listener.
|
void |
dispatch() |
Dispatch the request.
|
void |
dispatch(String path) |
Dispatch the request.
|
void |
dispatch(ServletContext context,
String path) |
Dispatch the request.
|
ServletRequest |
getRequest() |
Get the request.
|
ServletResponse |
getResponse() |
Get the response.
|
long |
getTimeout() |
Get the timeout.
|
boolean |
hasOriginalRequestAndResponse() |
Has the original request and response.
|
void |
setTimeout(long timeout) |
Set the timeout.
|
void |
start(Runnable runnable) |
Start the thread.
|
static final String ASYNC_CONTEXT_PATH
static final String ASYNC_MAPPING
static final String ASYNC_PATH_INFO
static final String ASYNC_QUERY_STRING
static final String ASYNC_REQUEST_URI
static final String ASYNC_SERVLET_PATH
void addListener(AsyncListener listener)
listener
- the async listener.void addListener(AsyncListener listener, ServletRequest servletRequest, ServletResponse servletResponse)
listener
- the async listener.servletRequest
- the servlet request.servletResponse
- the servlet response.void complete()
<T extends AsyncListener> T createListener(Class<T> clazz) throws ServletException
T
- the listener type.clazz
- the class.ServletException
- when a servvoid dispatch()
void dispatch(ServletContext context, String path)
context
- the servlet context.path
- the path.void dispatch(String path)
path
- the path.ServletRequest getRequest()
ServletResponse getResponse()
long getTimeout()
boolean hasOriginalRequestAndResponse()
void setTimeout(long timeout)
timeout
- the timeout.void start(Runnable runnable)
runnable
- the runnable.Copyright © 2020 Piranha Cloud. All rights reserved.