Interface AsyncSupport<E extends AtmosphereResource>

All Known Implementing Classes:
AsynchronousProcessor, BlockingIOCometSupport, GlassFishServ30WebSocketSupport, GlassFishServlet30WebSocketSupport, GlassFishv2CometSupport, GlassFishWebSocketSupport, Grizzly2CometSupport, Grizzly2WebSocketSupport, GrizzlyCometSupport, GrizzlyServlet30WebSocketSupport, JBossAsyncSupportWithWebSocket, JBossWebCometSupport, Jetty7CometSupport, Jetty93AsyncSupportWithWebSocket, Jetty9AsyncSupportWithWebSocket, JettyAsyncSupportWithWebSocket, JettyCometSupport, JettyServlet30AsyncSupportWithWebSocket, JSR356AsyncSupport, NettyCometSupport, Servlet30CometSupport, Tomcat7AsyncSupportWithWebSocket, Tomcat7BIOSupportWithWebSocket, Tomcat7CometSupport, Tomcat7Servlet30SupportWithWebSocket, TomcatCometSupport, WebLogicServlet30WithWebSocket

public interface AsyncSupport<E extends AtmosphereResource>
Atmosphere's supported WebServer must implement this interface in order to be auto detected by the AtmosphereFramework. If the AtmosphereFramework fail to detect the AsyncSupport, it will use a blocking thread approach to emulate Comet using the BlockingIOCometSupport.

Framework designers or Atmosphere application developers can also add their own implementation of that class by referencing their class within the atmosphere.xml file:


 invalid input: '<'<atmosphere-handler ... comet-support="your.class.name">
 

Author:
Jeanfrancois Arcand
  • Method Details

    • getContainerName

      String getContainerName()
      Return the name of the Java Web Server.
      Returns:
      the name of the Java Web Server.
    • init

      void init(javax.servlet.ServletConfig sc) throws javax.servlet.ServletException
      Initialize the WebServer using the ServletConfig
      Parameters:
      sc - the ServletConfig
      Throws:
      javax.servlet.ServletException
    • service

      Action service(AtmosphereRequest req, AtmosphereResponse res) throws IOException, javax.servlet.ServletException
      Serve the AtmosphereRequest and the AtmosphereResponse and return the appropriate Action.
      Parameters:
      req - the AtmosphereRequest
      res - the AtmosphereResponse
      Returns:
      the Action that was manipulated by the AtmosphereHandler
      Throws:
      IOException
      javax.servlet.ServletException
    • action

      void action(E actionEvent)
      Process an Action from an ActionEvent operation like suspend, resume or timed out.
      Parameters:
      actionEvent - An instance of Action
    • supportWebSocket

      boolean supportWebSocket()
      Return true if this implementation supports the websocket protocol.
      Returns:
      true if supported
    • complete

      AsyncSupport complete(E r)
      Complete and close the connection associated with an implementation of AtmosphereResource
      Parameters:
      r - AtmosphereResource
      Returns:
      this