Package org.atmosphere.container
Class GlassFishWebSocketSupport
- java.lang.Object
-
- org.atmosphere.cpr.AsynchronousProcessor
-
- org.atmosphere.container.GrizzlyCometSupport
-
- org.atmosphere.container.GlassFishWebSocketSupport
-
- All Implemented Interfaces:
AsyncSupport<AtmosphereResourceImpl>
public class GlassFishWebSocketSupport extends GrizzlyCometSupport
Websocket Portable Runtime implementation on top of GlassFish 3.0.1 and up.- Author:
- Jeanfrancois Arcand
-
-
Field Summary
-
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
cancelledAction, config, timedoutAction
-
-
Constructor Summary
Constructors Constructor Description GlassFishWebSocketSupport(AtmosphereConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContainerName()Return the container's name.voidinit(javax.servlet.ServletConfig sc)Init Grizzly'sCometContextthat will be used to suspend and resume the response.Actionservice(AtmosphereRequest request, AtmosphereResponse response)voidshutdown()booleansupportWebSocket()Return true if this implementation supports the websocket protocol.-
Methods inherited from class org.atmosphere.container.GrizzlyCometSupport
action, cancelled, complete
-
Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor
allowSessionTimeoutRemoval, completeLifecycle, endRequest, invokeAtmosphereHandler, invokeInterceptors, map, postInterceptors, resumed, supportSession, suspended, timedout
-
-
-
-
Constructor Detail
-
GlassFishWebSocketSupport
public GlassFishWebSocketSupport(AtmosphereConfig config)
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig sc) throws javax.servlet.ServletExceptionDescription copied from class:GrizzlyCometSupportInit Grizzly'sCometContextthat will be used to suspend and resume the response.- Specified by:
initin interfaceAsyncSupport<AtmosphereResourceImpl>- Overrides:
initin classGrizzlyCometSupport- Parameters:
sc- theServletContext- Throws:
javax.servlet.ServletException
-
shutdown
public void shutdown()
- Overrides:
shutdownin classAsynchronousProcessor
-
service
public Action service(AtmosphereRequest request, AtmosphereResponse response) throws java.io.IOException, javax.servlet.ServletException
Description copied from interface:AsyncSupport- Specified by:
servicein interfaceAsyncSupport<AtmosphereResourceImpl>- Overrides:
servicein classGrizzlyCometSupport- Parameters:
request- theAtmosphereRequestresponse- theAtmosphereResponse- Returns:
- the
Actionthat was manipulated by theAtmosphereHandler - Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
getContainerName
public java.lang.String getContainerName()
Return the container's name.- Specified by:
getContainerNamein interfaceAsyncSupport<AtmosphereResourceImpl>- Overrides:
getContainerNamein classAsynchronousProcessor- Returns:
- the name of the Java Web Server.
-
supportWebSocket
public boolean supportWebSocket()
Description copied from interface:AsyncSupportReturn true if this implementation supports the websocket protocol.- Specified by:
supportWebSocketin interfaceAsyncSupport<AtmosphereResourceImpl>- Overrides:
supportWebSocketin classAsynchronousProcessor- Returns:
- true if supported
-
-