org.atmosphere.container
Class Jetty7CometSupport

java.lang.Object
  extended by org.atmosphere.cpr.AsynchronousProcessor
      extended by org.atmosphere.container.Jetty7CometSupport
All Implemented Interfaces:
AsyncSupport<AtmosphereResourceImpl>
Direct Known Subclasses:
JettyAsyncSupportWithWebSocket

public class Jetty7CometSupport
extends AsynchronousProcessor

Comet Portable Runtime implementation on top of Jetty's Continuation.

Author:
Jeanfrancois Arcand

Nested Class Summary
 
Nested classes/interfaces inherited from class org.atmosphere.cpr.AsynchronousProcessor
AsynchronousProcessor.AsynchronousProcessorHook
 
Field Summary
 
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
aliveRequests, cancelledAction, config, timedoutAction
 
Constructor Summary
Jetty7CometSupport(AtmosphereConfig config)
           
 
Method Summary
 void action(AtmosphereResourceImpl r)
          Process an AtmosphereFramework.Action from an ActionEvent operation like suspend, resume or timed out.
 AtmosphereFramework.Action resumed(AtmosphereRequest req, AtmosphereResponse res)
          All proprietary Comet based Servlet must invoke the resume method when the Atmosphere's application decide to resume the AtmosphereResponse.
 AtmosphereFramework.Action service(AtmosphereRequest req, AtmosphereResponse res)
          Serve the AtmosphereRequest and the AtmosphereResponse and return the appropriate AtmosphereFramework.Action.
 
Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor
cancelled, destroyResource, getContainerName, init, map, map, shutdown, supportSession, supportWebSocket, suspended, timedout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jetty7CometSupport

public Jetty7CometSupport(AtmosphereConfig config)
Method Detail

service

public AtmosphereFramework.Action service(AtmosphereRequest req,
                                          AtmosphereResponse res)
                                   throws IOException,
                                          javax.servlet.ServletException
Serve the AtmosphereRequest and the AtmosphereResponse and return the appropriate AtmosphereFramework.Action.

Parameters:
req - the AtmosphereRequest
res - the AtmosphereResponse
Returns:
the AtmosphereFramework.Action that was manipulated by the AtmosphereHandler
Throws:
IOException
javax.servlet.ServletException

resumed

public AtmosphereFramework.Action resumed(AtmosphereRequest req,
                                          AtmosphereResponse res)
                                   throws IOException,
                                          javax.servlet.ServletException
Description copied from class: AsynchronousProcessor
All proprietary Comet based Servlet must invoke the resume method when the Atmosphere's application decide to resume the AtmosphereResponse. The returned value, of type AtmosphereFramework.Action, tells the proprietary Comet Servlet to resume (again), suspended or do nothing with the current AtmosphereResponse.

Overrides:
resumed in class AsynchronousProcessor
Parameters:
req - the AtmosphereRequest
res - the AtmosphereResponse
Returns:
action the Action operation.
Throws:
IOException
javax.servlet.ServletException

action

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

Specified by:
action in interface AsyncSupport<AtmosphereResourceImpl>
Overrides:
action in class AsynchronousProcessor
Parameters:
r - An instance of AtmosphereFramework.Action


Copyright © 2012. All Rights Reserved.