public class AsyncContextImpl extends java.lang.Object implements AsyncContext, SocketLinkCometListener
ASYNC_CONTEXT_PATH, ASYNC_PATH_INFO, ASYNC_QUERY_STRING, ASYNC_REQUEST_URI, ASYNC_SERVLET_PATH| Constructor and Description |
|---|
AsyncContextImpl(AbstractHttpRequest httpConn) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(AsyncListener listener) |
void |
addListener(AsyncListener listener,
ServletRequest request,
ServletResponse response) |
void |
clearListeners() |
void |
complete()
Completes the comet connection
|
<T extends AsyncListener> |
createListener(java.lang.Class<T> cl) |
void |
dispatch() |
void |
dispatch(ServletContext context,
java.lang.String path) |
void |
dispatch(java.lang.String path) |
ServletRequest |
getRequest()
Returns the originating request for the async.
|
ServletResponse |
getResponse()
Returns the originating request for the async.
|
long |
getTimeout()
Returns the suspend/idle timeout for the async request.
|
boolean |
hasOriginalRequestAndResponse() |
void |
init(ServletRequest request,
ServletResponse response,
boolean isOriginal) |
boolean |
isAsyncComplete() |
boolean |
isAsyncStarted() |
boolean |
isTimeout() |
void |
onComplete()
Called when the connection closes
|
void |
onError()
CometHandler callback when the connection times out.
|
void |
onStart(ServletRequest request,
ServletResponse response)
CometHandler callback when the connection starts.
|
boolean |
onTimeout()
CometHandler callback when the connection times out.
|
void |
restart() |
void |
setTimeout(long idleTimeout)
Sets the suspend/idle timeout for the async request.
|
void |
start(java.lang.Runnable task) |
java.lang.String |
toString() |
public AsyncContextImpl(AbstractHttpRequest httpConn)
public void restart()
public void clearListeners()
public void init(ServletRequest request, ServletResponse response, boolean isOriginal)
public ServletRequest getRequest()
getRequest in interface AsyncContextpublic ServletResponse getResponse()
getResponse in interface AsyncContextpublic boolean hasOriginalRequestAndResponse()
hasOriginalRequestAndResponse in interface AsyncContextpublic void setTimeout(long idleTimeout)
setTimeout in interface AsyncContextpublic long getTimeout()
getTimeout in interface AsyncContextpublic boolean isAsyncStarted()
public boolean isAsyncComplete()
public void addListener(AsyncListener listener)
addListener in interface AsyncContextpublic void addListener(AsyncListener listener, ServletRequest request, ServletResponse response)
addListener in interface AsyncContextpublic <T extends AsyncListener> T createListener(java.lang.Class<T> cl) throws ServletException
createListener in interface AsyncContextServletExceptionpublic void dispatch()
dispatch in interface AsyncContextpublic void dispatch(java.lang.String path)
dispatch in interface AsyncContextpublic void dispatch(ServletContext context, java.lang.String path)
dispatch in interface AsyncContextpublic void start(java.lang.Runnable task)
start in interface AsyncContextpublic void complete()
complete in interface AsyncContextpublic void onStart(ServletRequest request, ServletResponse response)
public boolean isTimeout()
public boolean onTimeout()
onTimeout in interface SocketLinkCometListenerpublic void onError()
public void onComplete()
SocketLinkCometListeneronComplete in interface SocketLinkCometListenerpublic java.lang.String toString()
toString in class java.lang.Object