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 AsyncContext
public ServletResponse getResponse()
getResponse
in interface AsyncContext
public boolean hasOriginalRequestAndResponse()
hasOriginalRequestAndResponse
in interface AsyncContext
public void setTimeout(long idleTimeout)
setTimeout
in interface AsyncContext
public long getTimeout()
getTimeout
in interface AsyncContext
public boolean isAsyncStarted()
public boolean isAsyncComplete()
public void addListener(AsyncListener listener)
addListener
in interface AsyncContext
public void addListener(AsyncListener listener, ServletRequest request, ServletResponse response)
addListener
in interface AsyncContext
public <T extends AsyncListener> T createListener(java.lang.Class<T> cl) throws ServletException
createListener
in interface AsyncContext
ServletException
public void dispatch()
dispatch
in interface AsyncContext
public void dispatch(java.lang.String path)
dispatch
in interface AsyncContext
public void dispatch(ServletContext context, java.lang.String path)
dispatch
in interface AsyncContext
public void start(java.lang.Runnable task)
start
in interface AsyncContext
public void complete()
complete
in interface AsyncContext
public void onStart(ServletRequest request, ServletResponse response)
public boolean isTimeout()
public boolean onTimeout()
onTimeout
in interface SocketLinkCometListener
public void onError()
public void onComplete()
SocketLinkCometListener
onComplete
in interface SocketLinkCometListener
public java.lang.String toString()
toString
in class java.lang.Object