org.atmosphere.container
Class BlockingIOCometSupport

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

public class BlockingIOCometSupport
extends AsynchronousProcessor
implements CometSupport<AtmosphereEventImpl>

This class gets used when the AtmosphereServlet fails to autodetect the Servlet Container we have been deployed. This CometSupport implementation uses a blocking approach, meaning the request thread will be blocked until another Thread invoke the Broadcaster#notify

Author:
Jeanfrancois Arcand

Field Summary
 
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
EVENT, logger
 
Constructor Summary
BlockingIOCometSupport(AtmosphereServlet.AtmosphereConfig config)
           
 
Method Summary
 void action(AtmosphereEventImpl 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, 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<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.