|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.cpr.AsynchronousProcessor
public abstract class AsynchronousProcessor
Base class which implement the semantics of supending and resuming of a Comet Request.
| Field Summary | |
|---|---|
protected ConcurrentHashMap<HttpServletRequest,AtmosphereResource> |
aliveRequests
|
protected Logger |
logger
|
protected static String |
RESOURCE_EVENT
|
static String |
SUPPORT_SESSION
|
| Constructor Summary | |
|---|---|
AsynchronousProcessor(AtmosphereServlet.AtmosphereConfig config)
|
|
| Method Summary | |
|---|---|
void |
action(AtmosphereResourceImpl actionEvent)
Process an AtmosphereServlet.Action from an ActionEvent operation like suspend, resume or timed out. |
AtmosphereServlet.Action |
cancelled(HttpServletRequest req,
HttpServletResponse res)
All proprietary Comet based Servlet must invoke the cancelled
method when the underlying WebServer detect that the client closed
the connection. |
String |
getContainerName()
Return the container's name. |
void |
init(ServletConfig sc)
Initialize the WebServer using the ServletConfig |
AtmosphereServlet.Action |
resumed(HttpServletRequest req,
HttpServletResponse res)
All proprietary Comet based Servlet must invoke the resume
method when the Atmosphere's application decide to resume the HttpServletResponse. |
protected boolean |
supportSession()
Is HttpSession supported |
AtmosphereServlet.Action |
suspended(HttpServletRequest req,
HttpServletResponse res)
All proprietary Comet based Servlet must invoke the suspended
method when the first request comes in. |
AtmosphereServlet.Action |
timedout(HttpServletRequest req,
HttpServletResponse res)
All proprietary Comet based Servlet must invoke the timedout
method when the underlying WebServer time out the HttpServletResponse. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.atmosphere.cpr.CometSupport |
|---|
service |
| Field Detail |
|---|
protected final Logger logger
protected static final String RESOURCE_EVENT
public static final String SUPPORT_SESSION
protected final ConcurrentHashMap<HttpServletRequest,AtmosphereResource> aliveRequests
| Constructor Detail |
|---|
public AsynchronousProcessor(AtmosphereServlet.AtmosphereConfig config)
| Method Detail |
|---|
public void init(ServletConfig sc)
throws ServletException
CometSupportServletConfig
init in interface CometSupport<AtmosphereResourceImpl>sc - the ServletConfig
ServletExceptionprotected boolean supportSession()
HttpSession supported
public String getContainerName()
getContainerName in interface CometSupport<AtmosphereResourceImpl>
public AtmosphereServlet.Action suspended(HttpServletRequest req,
HttpServletResponse res)
throws IOException,
ServletException
Servlet must invoke the suspended
method when the first request comes in. The returned value, of type
Atmosphere#Action, tells the proprietary Comet Servlet
to suspended or not the current HttpServletResponse.
req - the HttpServletRequestres - the HttpServletResponse
IOException
ServletExceptionpublic void action(AtmosphereResourceImpl actionEvent)
AtmosphereServlet.Action from an ActionEvent operation like suspend, resume or timed out.
action in interface CometSupport<AtmosphereResourceImpl>
public AtmosphereServlet.Action resumed(HttpServletRequest req,
HttpServletResponse res)
throws IOException,
ServletException
Servlet must invoke the resume
method when the Atmosphere's application decide to resume the HttpServletResponse.
The returned value, of type
Atmosphere#Action, tells the proprietary Comet Servlet
to resume (again), suspended or do nothing with the current HttpServletResponse.
req - the HttpServletRequestres - the HttpServletResponse
IOException
ServletException
public AtmosphereServlet.Action timedout(HttpServletRequest req,
HttpServletResponse res)
throws IOException,
ServletException
Servlet must invoke the timedout
method when the underlying WebServer time out the HttpServletResponse.
The returned value, of type
Atmosphere#Action, tells the proprietary Comet Servlet
to resume (again), suspended or do nothing with the current HttpServletResponse.
req - the HttpServletRequestres - the HttpServletResponse
IOException
ServletException
public AtmosphereServlet.Action cancelled(HttpServletRequest req,
HttpServletResponse res)
throws IOException,
ServletException
Servlet must invoke the cancelled
method when the underlying WebServer detect that the client closed
the connection.
req - the HttpServletRequestres - the HttpServletResponse
IOException
ServletException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||