org.atmosphere.container
Class GlassFishWebSocketSupport

java.lang.Object
  extended by org.atmosphere.cpr.AsynchronousProcessor
      extended by org.atmosphere.container.GrizzlyCometSupport
          extended by org.atmosphere.container.GlassFishWebSocketSupport
All Implemented Interfaces:
CometSupport<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
aliveRequests, cancelledAction, config, timedoutAction
 
Constructor Summary
GlassFishWebSocketSupport(AtmosphereServlet.AtmosphereConfig config)
           
 
Method Summary
 String getContainerName()
          Return the container's name.
 void init(javax.servlet.ServletConfig sc)
          Init Grizzly's CometContext that will be used to suspend and resume the response.
 AtmosphereServlet.Action service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Serve the HttpServletRequest and the HttpServletResponse and return the appropriate AtmosphereServlet.Action.
 boolean supportWebSocket()
          Return true if this implementation supports the websocket protocol.
 
Methods inherited from class org.atmosphere.container.GrizzlyCometSupport
action, cancelled
 
Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor
destroyResource, map, resumed, supportSession, suspended, timedout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlassFishWebSocketSupport

public GlassFishWebSocketSupport(AtmosphereServlet.AtmosphereConfig config)
Method Detail

init

public void init(javax.servlet.ServletConfig sc)
          throws javax.servlet.ServletException
Description copied from class: GrizzlyCometSupport
Init Grizzly's CometContext that will be used to suspend and resume the response.

Specified by:
init in interface CometSupport<AtmosphereResourceImpl>
Overrides:
init in class GrizzlyCometSupport
Parameters:
sc - the ServletContext
Throws:
javax.servlet.ServletException

service

public AtmosphereServlet.Action service(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response)
                                 throws IOException,
                                        javax.servlet.ServletException
Serve the HttpServletRequest and the HttpServletResponse and return the appropriate AtmosphereServlet.Action.

Specified by:
service in interface CometSupport<AtmosphereResourceImpl>
Overrides:
service in class GrizzlyCometSupport
Parameters:
request - the HttpServletRequest
response - the HttpServletResponse
Returns:
the AtmosphereServlet.Action that was manipulated by the AtmosphereHandler
Throws:
IOException
javax.servlet.ServletException

getContainerName

public String getContainerName()
Return the container's name.

Specified by:
getContainerName in interface CometSupport<AtmosphereResourceImpl>
Overrides:
getContainerName in class AsynchronousProcessor
Returns:
the name of the Java Web Server.

supportWebSocket

public boolean supportWebSocket()
Description copied from interface: CometSupport
Return true if this implementation supports the websocket protocol. return true if supported

Specified by:
supportWebSocket in interface CometSupport<AtmosphereResourceImpl>
Overrides:
supportWebSocket in class AsynchronousProcessor


Copyright © 2011. All Rights Reserved.