org.atmosphere.container
Class GlassFishv2CometSupport

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

public class GlassFishv2CometSupport
extends WebContainer
implements CometSupport

Comet Portable Runtime implementation on top of Grizzly API included with GlassFish v2.

Author:
Jeanfrancois Arcand

Field Summary
 
Fields inherited from class org.atmosphere.cpr.WebContainer
atmosphereHandlers, EVENT, logger
 
Constructor Summary
GlassFishv2CometSupport(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.
 void init(ServletConfig sc)
          Init Grizzly's CometContext that will be used to suspend and resume the response.
 AtmosphereServlet.Action service(HttpServletRequest req, HttpServletResponse res)
          Serve the HttpServletRequest and the HttpServletResponse.
 
Methods inherited from class org.atmosphere.cpr.WebContainer
resumed, setWebServerName, suspended, timedout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlassFishv2CometSupport

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

init

public void init(ServletConfig sc)
          throws ServletException
Init Grizzly's CometContext that will be used to suspend and resume the response.

Specified by:
init in interface CometSupport
Overrides:
init in class WebContainer
Parameters:
sc - the ServletContext
Throws:
ServletException

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
Serve the HttpServletRequest and the HttpServletResponse.

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


Copyright © 2009 SUN Microsystems. All Rights Reserved.