org.atmosphere.container
Class TomcatCometSupport

java.lang.Object
  extended by org.atmosphere.cpr.WebContainer
      extended by org.atmosphere.container.TomcatCometSupport
All Implemented Interfaces:
CometSupport

public class TomcatCometSupport
extends WebContainer
implements CometSupport

Comet Portable Runtime implementation on top of Tomcat AIO.

Author:
Jeanfrancois Arcand

Field Summary
static String COMET_EVENT
           
 
Fields inherited from class org.atmosphere.cpr.WebContainer
atmosphereHandlers, EVENT, logger
 
Constructor Summary
TomcatCometSupport(Map<String,AtmosphereServlet.AtmosphereHandlerWrapper> atmosphereHandlers)
           
 
Method Summary
 String getContainerDottedVersion()
          Return the supported version of the Java Web Server
 String getContainerName()
          Return the name of the Java Web Server.
 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.WebContainer
init, resumed, setWebServerName, 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
init
 

Field Detail

COMET_EVENT

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

TomcatCometSupport

public TomcatCometSupport(Map<String,AtmosphereServlet.AtmosphereHandlerWrapper> atmosphereHandlers)
Method Detail

getContainerName

public String getContainerName()
Return the name of the Java Web Server.

Specified by:
getContainerName in interface CometSupport
Returns:
the name of the Java Web Server.

getContainerDottedVersion

public String getContainerDottedVersion()
Return the supported version of the Java Web Server

Specified by:
getContainerDottedVersion in interface CometSupport
Returns:
the supported version of the Java Web Server

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
Parameters:
req - the HttpServeltRequest
res - the HttpServletResponse
Returns:
the AtmosphereServlet.Action that was manipulated by the AtmosphereHandler
Throws:
IOException
ServletException


Copyright © 2009 SUN Microsystems. All Rights Reserved.