|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.server.http.AsyncContextImpl
public class AsyncContextImpl
Public API to control a comet connection.
Field Summary |
---|
Fields inherited from interface javax.servlet.AsyncContext |
---|
ASYNC_CONTEXT_PATH, ASYNC_PATH_INFO, ASYNC_QUERY_STRING, ASYNC_REQUEST_URI, ASYNC_SERVLET_PATH |
Constructor Summary | |
---|---|
AsyncContextImpl(AbstractHttpRequest httpConn)
|
Method Summary | ||
---|---|---|
void |
addListener(AsyncListener listener)
|
|
void |
addListener(AsyncListener listener,
ServletRequest request,
ServletResponse response)
|
|
void |
complete()
Completes the comet connection |
|
|
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()
|
|
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. |
|
void |
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AsyncContextImpl(AbstractHttpRequest httpConn)
Method Detail |
---|
public void restart()
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 void 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |