org.atmosphere.cpr
Interface CometSupport<E extends AtmosphereEvent>

All Known Implementing Classes:
AsynchronousProcessor, BlockingIOCometSupport, GlassFishv2CometSupport, GlassFishv3CometSupport, GrizzlyCometSupport, JBossWebCometSupport, Jetty7CometSupport, JettyCometSupport, Servlet30Support, TomcatCometSupport, WebLogicCometSupport

public interface CometSupport<E extends AtmosphereEvent>

Atmosphere's supported WebServer must implement this interface in order to be auto detected by the AtmosphereServlet. If the AtmosphereServlet fail to detect the CometSupport, it will use a blocking thread approach to emulate Comet using the BlockingIOCometSupport. Framework designed can also add their own implementation of that class.

Author:
Jeanfrancois Arcand

Method Summary
 void action(E actionEvent)
          Process an AtmosphereServlet.Action from an ActionEvent operation like suspend, resume or timed out.
 String getContainerName()
          Return the name of the Java Web Server.
 void init(ServletConfig sc)
          Initialize the WebServer using the ServletConfig
 AtmosphereServlet.Action service(HttpServletRequest req, HttpServletResponse res)
          Serve the HttpServletRequest and the HttpServletResponse and return the appropriate AtmosphereServlet.Action.
 

Method Detail

getContainerName

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

Returns:
the name of the Java Web Server.

init

void init(ServletConfig sc)
          throws ServletException
Initialize the WebServer using the ServletConfig

Parameters:
sc - the ServletConfig
Throws:
ServletException

service

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

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

action

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

Parameters:
action -


Copyright © 2009 SUN Microsystems. All Rights Reserved.