org.atmosphere.container
Class Servlet30Support

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

public class Servlet30Support
extends AsynchronousProcessor
implements CometSupport<AtmosphereResourceImpl>

This class gets used when the AtmosphereServlet detect the container detect Servlet 3.0 Asynch API.

Author:
Jeanfrancois Arcand

Field Summary
 
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
aliveRequests, logger, RESOURCE_EVENT, SUPPORT_SESSION
 
Constructor Summary
Servlet30Support(AtmosphereServlet.AtmosphereConfig config)
           
 
Method Summary
 void action(AtmosphereResourceImpl actionEvent)
          Process an AtmosphereServlet.Action from an ActionEvent operation like suspend, resume or timed out.
 String getContainerName()
          Return "javax.servlet".
 AtmosphereServlet.Action service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Serve the HttpServletRequest and the HttpServletResponse and return the appropriate AtmosphereServlet.Action.
 
Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor
cancelled, 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
init
 

Constructor Detail

Servlet30Support

public Servlet30Support(AtmosphereServlet.AtmosphereConfig config)
Method Detail

getContainerName

public String getContainerName()
Return "javax.servlet".

Specified by:
getContainerName in interface CometSupport<AtmosphereResourceImpl>
Overrides:
getContainerName in class AsynchronousProcessor
Returns:
"javax.servlet"

service

public AtmosphereServlet.Action service(javax.servlet.http.HttpServletRequest req,
                                        javax.servlet.http.HttpServletResponse res)
                                 throws IOException,
                                        javax.servlet.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
javax.servlet.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
Parameters:
actionEvent - An instance of AtmosphereServlet.Action


Copyright © 2010 SUN Microsystems. All Rights Reserved.