Package 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,Jetty93AsyncSupportWithWebSocket,Jetty9AsyncSupportWithWebSocket,JettyServlet30AsyncSupportWithWebSocket,JSR356AsyncSupport,Tomcat7Servlet30SupportWithWebSocket,WebLogicServlet30WithWebSocket
public class Servlet30CometSupport extends AsynchronousProcessor
This class is used when theAtmosphereFrameworkdetect the container detect Servlet 3.0 Asynch API.- Author:
- Jeanfrancois Arcand
-
-
Field Summary
-
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
cancelledAction, config, timedoutAction
-
-
Constructor Summary
Constructors Constructor Description Servlet30CometSupport(AtmosphereConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaction(AtmosphereResourceImpl r)Process anActionfrom anActionEventoperation like suspend, resume or timed out.Actioncancelled(AtmosphereRequest req, AtmosphereResponse res)All proprietary Comet basedServletmust invoke the cancelled method when the underlying WebServer detect that the client closed the connection.AsyncSupport<AtmosphereResourceImpl>complete(AtmosphereResourceImpl r)Complete and close the connection associated with an implementation ofAtmosphereResourcevoidendAsyncContext(AtmosphereRequest request)java.lang.StringgetContainerName()Return "javax.servlet".Actionservice(AtmosphereRequest request, AtmosphereResponse response)-
Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor
allowSessionTimeoutRemoval, completeLifecycle, endRequest, init, invokeAtmosphereHandler, invokeInterceptors, map, postInterceptors, resumed, shutdown, supportSession, supportWebSocket, suspended, timedout
-
-
-
-
Constructor Detail
-
Servlet30CometSupport
public Servlet30CometSupport(AtmosphereConfig config)
-
-
Method Detail
-
getContainerName
public java.lang.String getContainerName()
Return "javax.servlet".- Specified by:
getContainerNamein interfaceAsyncSupport<AtmosphereResourceImpl>- Overrides:
getContainerNamein classAsynchronousProcessor- Returns:
- "javax.servlet"
-
service
public Action service(AtmosphereRequest request, AtmosphereResponse response) throws java.io.IOException, javax.servlet.ServletException
Description copied from interface:AsyncSupport- Parameters:
request- theAtmosphereRequestresponse- theAtmosphereResponse- Returns:
- the
Actionthat was manipulated by theAtmosphereHandler - Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
action
public void action(AtmosphereResourceImpl r)
Description copied from interface:AsyncSupportProcess anActionfrom anActionEventoperation like suspend, resume or timed out.- Specified by:
actionin interfaceAsyncSupport<AtmosphereResourceImpl>- Overrides:
actionin classAsynchronousProcessor- Parameters:
r- An instance ofAction
-
complete
public AsyncSupport<AtmosphereResourceImpl> complete(AtmosphereResourceImpl r)
Description copied from interface:AsyncSupportComplete and close the connection associated with an implementation ofAtmosphereResource- Specified by:
completein interfaceAsyncSupport<AtmosphereResourceImpl>- Overrides:
completein classAsynchronousProcessor- Parameters:
r-AtmosphereResource- Returns:
- this
-
endAsyncContext
public void endAsyncContext(AtmosphereRequest request)
-
cancelled
public Action cancelled(AtmosphereRequest req, AtmosphereResponse res) throws java.io.IOException, javax.servlet.ServletException
Description copied from class:AsynchronousProcessorAll proprietary Comet basedServletmust invoke the cancelled method when the underlying WebServer detect that the client closed the connection.- Overrides:
cancelledin classAsynchronousProcessor- Parameters:
req- theAtmosphereRequestres- theAtmosphereResponse- Returns:
- action the Action operation.
- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
-