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

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

public interface CometSupport<E extends AtmosphereResource>

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 designer or Atmosphere application developer can also add their own implementation of that class by referencing their class within the atmosphere.xml file:


 <<atmosphere-handler ... comet-support="your.class.name">
 

Author:
Jeanfrancois Arcand

Field Summary
static String MAX_INACTIVE
           
 
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.
 boolean supportWebSocket()
          Return true if this implementation supports the websocket protocol.
 

Field Detail

MAX_INACTIVE

static final String MAX_INACTIVE
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:
actionEvent - An instance of AtmosphereServlet.Action

supportWebSocket

boolean supportWebSocket()
Return true if this implementation supports the websocket protocol. return true if supported



Copyright © 2010. All Rights Reserved.