org.atmosphere.container
Class GrizzlyCometSupport

java.lang.Object
  extended by org.atmosphere.cpr.AsynchronousProcessor
      extended by org.atmosphere.container.GrizzlyCometSupport
All Implemented Interfaces:
CometSupport<AtmosphereEventImpl>
Direct Known Subclasses:
GlassFishv3CometSupport

public class GrizzlyCometSupport
extends AsynchronousProcessor
implements CometSupport<AtmosphereEventImpl>

Comet Portable Runtime implementation on top of Grizzly 1.5 and up.

Author:
Jeanfrancois Arcand

Field Summary
 
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
EVENT, logger
 
Constructor Summary
GrizzlyCometSupport(AtmosphereServlet.AtmosphereConfig config)
           
 
Method Summary
 void action(AtmosphereEventImpl actionEvent)
          Process an AtmosphereServlet.Action from an ActionEvent operation like suspend, resume or timed out.
 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 and return the appropriate AtmosphereServlet.Action.
 
Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor
cancelled, getContainerName, resumed, 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
 

Constructor Detail

GrizzlyCometSupport

public GrizzlyCometSupport(AtmosphereServlet.AtmosphereConfig config)
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<AtmosphereEventImpl>
Overrides:
init in class AsynchronousProcessor
Parameters:
sc - the ServletContext
Throws:
ServletException

service

public AtmosphereServlet.Action service(HttpServletRequest req,
                                        HttpServletResponse res)
                                 throws IOException,
                                        ServletException
Serve the HttpServletRequest and the HttpServletResponse and return the appropriate AtmosphereServlet.Action.

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

action

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

Specified by:
action in interface CometSupport<AtmosphereEventImpl>


Copyright © 2009 SUN Microsystems. All Rights Reserved.