org.atmosphere.container
Class Tomcat7CometSupport
java.lang.Object
org.atmosphere.cpr.AsynchronousProcessor
org.atmosphere.container.Tomcat7CometSupport
- All Implemented Interfaces:
- CometSupport<AtmosphereResourceImpl>
public class Tomcat7CometSupport
- extends AsynchronousProcessor
Comet Portable Runtime implementation on top of Tomcat AIO.
- Author:
- Jeanfrancois Arcand
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMET_EVENT
public static final String COMET_EVENT
- See Also:
- Constant Field Values
Tomcat7CometSupport
public Tomcat7CometSupport(AtmosphereServlet.AtmosphereConfig config)
service
public AtmosphereServlet.Action service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws IOException,
javax.servlet.ServletException
- Invoked by the Tomcat AIO when a Comet request gets detected.
- Parameters:
req - the HttpServletRequestres - the HttpServletResponse
- Returns:
- the
AtmosphereServlet.Action that was manipulated by the AtmosphereHandler
- Throws:
IOException
javax.servlet.ServletException
action
public void action(AtmosphereResourceImpl resource)
- 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:
resource - An instance of AtmosphereServlet.Action
cancelled
public AtmosphereServlet.Action cancelled(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws IOException,
javax.servlet.ServletException
- Description copied from class:
AsynchronousProcessor
- All proprietary Comet based
Servlet must invoke the cancelled
method when the underlying WebServer detect that the client closed
the connection.
- Overrides:
cancelled in class AsynchronousProcessor
- Parameters:
req - the HttpServletRequestres - the HttpServletResponse
- Returns:
- action the Action operation.
- Throws:
IOException
javax.servlet.ServletException
Copyright © 2011. All Rights Reserved.