org.atmosphere.container
Class JBossWebCometSupport

java.lang.Object
  extended by org.atmosphere.cpr.AsynchronousProcessor
      extended by org.atmosphere.container.JBossWebCometSupport
All Implemented Interfaces:
CometSupport<AtmosphereResourceImpl>

public class JBossWebCometSupport
extends AsynchronousProcessor
implements CometSupport<AtmosphereResourceImpl>

Comet Portable Runtime implementation on top of Tomcat AIO.

Author:
Jeanfrancois Arcand

Field Summary
static String HTTP_EVENT
           
 
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
aliveRequests, cancelledAction, config, logger, timedoutAction
 
Fields inherited from interface org.atmosphere.cpr.CometSupport
MAX_INACTIVE
 
Constructor Summary
JBossWebCometSupport(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.
 AtmosphereServlet.Action service(HttpServletRequest req, HttpServletResponse res)
          Invoked by the Tomcat AIO when a Comet request gets detected.
 
Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor
getContainerName, init, map, resumed, supportSession, supportWebSocket, suspended, timedout
 
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
getContainerName, init, supportWebSocket
 

Field Detail

HTTP_EVENT

public static final String HTTP_EVENT
See Also:
Constant Field Values
Constructor Detail

JBossWebCometSupport

public JBossWebCometSupport(AtmosphereServlet.AtmosphereConfig config)
Method Detail

service

public AtmosphereServlet.Action service(HttpServletRequest req,
                                        HttpServletResponse res)
                                 throws IOException,
                                        ServletException
Invoked by the Tomcat AIO when a Comet request gets detected.

Specified by:
service in interface CometSupport<AtmosphereResourceImpl>
Parameters:
req - the HttpServletRequest
res - the HttpServletResponse
Returns:
the AtmosphereServlet.Action that was manipulated by the AtmosphereHandler
Throws:
IOException
ServletException

cancelled

public AtmosphereServlet.Action cancelled(HttpServletRequest req,
                                          HttpServletResponse res)
                                   throws IOException,
                                          ServletException
Description copied from class: AsynchronousProcessor
All proprietary Comet based Servlet must invoke the cancelled method when the underlying WebServer detect that the client closed the connection.

Overrides:
cancelled in class AsynchronousProcessor
Parameters:
req - the HttpServletRequest
res - the HttpServletResponse
Returns:
action the Action operation.
Throws:
IOException
ServletException

action

public void action(AtmosphereResourceImpl actionEvent)
Process an AtmosphereServlet.Action from an ActionEvent operation like suspend, resume or timed out.

Specified by:
action in interface CometSupport<AtmosphereResourceImpl>
Overrides:
action in class AsynchronousProcessor
Parameters:
actionEvent - An instance of AtmosphereServlet.Action


Copyright © 2010. All Rights Reserved.