org.atmosphere.container
Class Servlet30CometSupport
java.lang.Object
org.atmosphere.cpr.AsynchronousProcessor
org.atmosphere.container.Servlet30CometSupport
- All Implemented Interfaces:
- AsyncSupport<AtmosphereResourceImpl>
- Direct Known Subclasses:
- GlassFishServ30WebSocketSupport, GlassFishServlet30WebSocketSupport, GrizzlyServlet30WebSocketSupport, Jetty9AsyncSupportWithWebSocket, JettyServlet30AsyncSupportWithWebSocket, JSR356AsyncSupport, Tomcat7Servlet30SupportWithWebSocket, WebLogicServlet30WithWebSocket
public class Servlet30CometSupport
- extends AsynchronousProcessor
This class is used when the AtmosphereFramework detect the container
detect Servlet 3.0 Asynch API.
- Author:
- Jeanfrancois Arcand
| Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor |
allowSessionTimeoutRemoval, completeLifecycle, init, invokeAtmosphereHandler, map, resumed, shutdown, supportSession, supportWebSocket, suspended, timedout |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Servlet30CometSupport
public Servlet30CometSupport(AtmosphereConfig config)
getContainerName
public String getContainerName()
- Return "javax.servlet".
- Specified by:
getContainerName in interface AsyncSupport<AtmosphereResourceImpl>- Overrides:
getContainerName in class AsynchronousProcessor
- Returns:
- "javax.servlet"
service
public Action service(AtmosphereRequest request,
AtmosphereResponse response)
throws IOException,
javax.servlet.ServletException
- Description copied from interface:
AsyncSupport
- Serve the
AtmosphereRequest and the AtmosphereResponse and return
the appropriate Action.
- Parameters:
request - the AtmosphereRequestresponse - the AtmosphereResponse
- Returns:
- the
Action that was manipulated by the AtmosphereHandler
- Throws:
IOException
javax.servlet.ServletException
action
public void action(AtmosphereResourceImpl r)
- Description copied from interface:
AsyncSupport
- Process an
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 Action
complete
public AsyncSupport complete(AtmosphereResourceImpl r)
- Description copied from interface:
AsyncSupport
- Complete and close the connection associated with an implementation of
AtmosphereResource
- Specified by:
complete in interface AsyncSupport<AtmosphereResourceImpl>- Overrides:
complete in class AsynchronousProcessor
- Parameters:
r - AtmosphereResource
- Returns:
- this
endAsyncContext
public void endAsyncContext(AtmosphereRequest request)
cancelled
public Action cancelled(AtmosphereRequest req,
AtmosphereResponse 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 AtmosphereRequestres - the AtmosphereResponse
- Returns:
- action the Action operation.
- Throws:
IOException
javax.servlet.ServletException
Copyright © 2014. All Rights Reserved.