org.atmosphere.container
Class BlockingIOCometSupport

java.lang.Object
  extended by org.atmosphere.cpr.AsynchronousProcessor
      extended by org.atmosphere.container.BlockingIOCometSupport
All Implemented Interfaces:
CometSupport<AtmosphereResourceImpl>

public class BlockingIOCometSupport
extends AsynchronousProcessor
implements CometSupport<AtmosphereResourceImpl>

This class gets used when the AtmosphereServlet fails to autodetect the Servlet Container we are running on. This CometSupport implementation uses a blocking approach, meaning the request thread will be blocked until another Thread invoke the Broadcaster.broadcast(java.lang.Object)

Author:
Jeanfrancois Arcand

Field Summary
 
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
aliveRequests, logger, RESOURCE_EVENT, SUPPORT_SESSION
 
Constructor Summary
BlockingIOCometSupport(AtmosphereServlet.AtmosphereConfig config)
           
 
Method Summary
 void action(AtmosphereResourceImpl actionEvent)
          Process an AtmosphereServlet.Action from an ActionEvent operation like suspend, resume or timed out.
 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, init, resumed, supportSession, 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, init
 

Constructor Detail

BlockingIOCometSupport

public BlockingIOCometSupport(AtmosphereServlet.AtmosphereConfig config)
Method Detail

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<AtmosphereResourceImpl>
Parameters:
req - the HttpServletRequest
res - the HttpServletResponse
Returns:
the AtmosphereServlet.Action that was manipulated by the AtmosphereHandler
Throws:
IOException
ServletException

action

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

Specified by:
action in interface CometSupport<AtmosphereResourceImpl>
Overrides:
action in class AsynchronousProcessor


Copyright © 2009 SUN Microsystems. All Rights Reserved.