org.atmosphere.container
Class Servlet30CometSupport

java.lang.Object
  extended by org.atmosphere.cpr.AsynchronousProcessor
      extended by org.atmosphere.container.Servlet30CometSupport
All Implemented Interfaces:
CometSupport<AtmosphereResourceImpl>
Direct Known Subclasses:
Servlet30CometSupportWithWebSocket

public class Servlet30CometSupport
extends AsynchronousProcessor

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, cancelledAction, config, timedoutAction
 
Constructor Summary
Servlet30CometSupport(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 request, javax.servlet.http.HttpServletResponse response)
          Serve the HttpServletRequest and the HttpServletResponse and return the appropriate AtmosphereServlet.Action.
 
Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor
cancelled, destroyResource, init, map, resumed, supportSession, supportWebSocket, suspended, timedout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Servlet30CometSupport

public Servlet30CometSupport(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 request,
                                        javax.servlet.http.HttpServletResponse response)
                                 throws IOException,
                                        javax.servlet.ServletException
Serve the HttpServletRequest and the HttpServletResponse and return the appropriate AtmosphereServlet.Action.

Parameters:
request - the HttpServletRequest
response - 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 © 2011. All Rights Reserved.