|
||||||||||
| 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 suspending and resuming of a Comet Request.
| Field Summary | |
|---|---|
protected ConcurrentHashMap<HttpServletRequest,AtmosphereResource<HttpServletRequest,HttpServletResponse>> |
aliveRequests
|
protected static AtmosphereServlet.Action |
cancelledAction
|
protected AtmosphereServlet.AtmosphereConfig |
config
|
protected Logger |
logger
|
protected static AtmosphereServlet.Action |
timedoutAction
|
| Fields inherited from interface org.atmosphere.cpr.CometSupport |
|---|
MAX_INACTIVE |
| Constructor Summary | |
|---|---|
AsynchronousProcessor(AtmosphereServlet.AtmosphereConfig config)
|
|
| Method Summary | |
|---|---|
void |
action(AtmosphereResourceImpl r)
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 |
protected AtmosphereServlet.AtmosphereHandlerWrapper |
map(HttpServletRequest req)
Return the AtmosphereHandler mapped to the passed servlet-path. |
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 |
boolean |
supportWebSocket()
Return true if this implementation supports the websocket protocol. |
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 static final AtmosphereServlet.Action timedoutAction
protected static final AtmosphereServlet.Action cancelledAction
protected final Logger logger
protected final AtmosphereServlet.AtmosphereConfig config
protected final ConcurrentHashMap<HttpServletRequest,AtmosphereResource<HttpServletRequest,HttpServletResponse>> 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
AtmosphereServlet.Action, tells the proprietary Comet Servlet
to suspended or not the current HttpServletResponse.
req - the HttpServletRequestres - the HttpServletResponse
IOException
ServletExceptionpublic void action(AtmosphereResourceImpl r)
AtmosphereServlet.Action from an ActionEvent operation like suspend, resume or timed out.
action in interface CometSupport<AtmosphereResourceImpl>r - An instance of AtmosphereServlet.Action
protected AtmosphereServlet.AtmosphereHandlerWrapper map(HttpServletRequest req)
throws ServletException
AtmosphereHandler mapped to the passed servlet-path.
req - the HttpServletResponse
AtmosphereHandler mapped to the passed servlet-path.
ServletException
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
AtmosphereServlet.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
AtmosphereServlet.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
ServletExceptionpublic boolean supportWebSocket()
CometSupport
supportWebSocket in interface CometSupport<AtmosphereResourceImpl>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||