Package org.atmosphere.container
Class GlassFishv2CometSupport
java.lang.Object
org.atmosphere.cpr.AsynchronousProcessor
org.atmosphere.container.GlassFishv2CometSupport
- All Implemented Interfaces:
AsyncSupport<AtmosphereResourceImpl>
Comet Portable Runtime implementation on top of Grizzly API included with GlassFish v2.
- Author:
- Jeanfrancois Arcand
-
Field Summary
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
cancelledAction, config, timedoutAction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidProcess anActionfrom anActionEventoperation like suspend, resume or timed out.cancelled(AtmosphereRequest req, AtmosphereResponse res) All proprietary Comet basedServletmust invoke the cancelled method when the underlying WebServer detect that the client closed the connection.Complete and close the connection associated with an implementation ofAtmosphereResourcevoidinit(javax.servlet.ServletConfig sc) Init Grizzly'sCometContextthat will be used to suspend and resume the response.service(AtmosphereRequest req, AtmosphereResponse res) Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor
allowSessionTimeoutRemoval, completeLifecycle, endRequest, getContainerName, invokeAtmosphereHandler, invokeInterceptors, map, postInterceptors, resumed, shutdown, supportSession, supportWebSocket, suspended, timedout
-
Constructor Details
-
GlassFishv2CometSupport
-
-
Method Details
-
init
public void init(javax.servlet.ServletConfig sc) throws javax.servlet.ServletException Init Grizzly'sCometContextthat will be used to suspend and resume the response.- Specified by:
initin interfaceAsyncSupport<AtmosphereResourceImpl>- Overrides:
initin classAsynchronousProcessor- Parameters:
sc- theServletContext- Throws:
javax.servlet.ServletException
-
service
public Action service(AtmosphereRequest req, AtmosphereResponse res) throws IOException, javax.servlet.ServletException - Parameters:
req- theAtmosphereRequestres- theAtmosphereResponse- Returns:
- the
Actionthat was manipulated by theAtmosphereHandler - Throws:
IOExceptionjavax.servlet.ServletException
-
action
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
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
-
cancelled
public Action cancelled(AtmosphereRequest req, AtmosphereResponse res) throws 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:
IOExceptionjavax.servlet.ServletException
-