public class MockAsyncContext extends Object implements AsyncContext
AsyncContext interface.ASYNC_CONTEXT_PATH, ASYNC_PATH_INFO, ASYNC_QUERY_STRING, ASYNC_REQUEST_URI, ASYNC_SERVLET_PATH| Constructor and Description |
|---|
MockAsyncContext(ServletRequest request,
ServletResponse response) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDispatchHandler(Runnable handler) |
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) |
String |
getDispatchedPath() |
List<AsyncListener> |
getListeners() |
ServletRequest |
getRequest() |
ServletResponse |
getResponse() |
long |
getTimeout() |
boolean |
hasOriginalRequestAndResponse() |
void |
setTimeout(long timeout) |
void |
start(Runnable runnable) |
public MockAsyncContext(ServletRequest request, ServletResponse response)
public void addDispatchHandler(Runnable handler)
public ServletRequest getRequest()
getRequest in interface AsyncContextpublic ServletResponse getResponse()
getResponse in interface AsyncContextpublic boolean hasOriginalRequestAndResponse()
hasOriginalRequestAndResponse in interface AsyncContextpublic void dispatch()
dispatch in interface AsyncContextpublic void dispatch(String path)
dispatch in interface AsyncContextpublic void dispatch(ServletContext context, String path)
dispatch in interface AsyncContextpublic String getDispatchedPath()
public void complete()
complete in interface AsyncContextpublic void start(Runnable runnable)
start in interface AsyncContextpublic void addListener(AsyncListener listener)
addListener in interface AsyncContextpublic void addListener(AsyncListener listener, ServletRequest request, ServletResponse response)
addListener in interface AsyncContextpublic List<AsyncListener> getListeners()
public <T extends AsyncListener> T createListener(Class<T> clazz) throws ServletException
createListener in interface AsyncContextServletExceptionpublic void setTimeout(long timeout)
setTimeout in interface AsyncContextpublic long getTimeout()
getTimeout in interface AsyncContext