org.atmosphere.container
Class GlassFishv2CometSupport
java.lang.Object
org.atmosphere.cpr.AsynchronousProcessor
org.atmosphere.container.GlassFishv2CometSupport
- All Implemented Interfaces:
- CometSupport<AtmosphereResourceImpl>
public class GlassFishv2CometSupport
- extends AsynchronousProcessor
Comet Portable Runtime implementation on top of Grizzly API included
with GlassFish v2.
- Author:
- Jeanfrancois Arcand
|
Method Summary |
void |
action(AtmosphereResourceImpl actionEvent)
Process an AtmosphereServlet.Action from an ActionEvent operation like suspend, resume or timed out. |
AtmosphereServlet.Action |
cancelled(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
All proprietary Comet based Servlet must invoke the cancelled
method when the underlying WebServer detect that the client closed
the connection. |
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 req,
javax.servlet.http.HttpServletResponse res)
Serve the HttpServletRequest and the HttpServletResponse and return
the appropriate AtmosphereServlet.Action. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GlassFishv2CometSupport
public GlassFishv2CometSupport(AtmosphereServlet.AtmosphereConfig config)
init
public void init(javax.servlet.ServletConfig sc)
throws javax.servlet.ServletException
- 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 AsynchronousProcessor
- Parameters:
sc - the ServletContext
- Throws:
javax.servlet.ServletException
service
public AtmosphereServlet.Action service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws IOException,
javax.servlet.ServletException
- Serve the
HttpServletRequest and the HttpServletResponse and return
the appropriate AtmosphereServlet.Action.
- Parameters:
req - the HttpServletRequestres - the HttpServletResponse
- Returns:
- the
AtmosphereServlet.Action that was manipulated by the AtmosphereHandler
- Throws:
IOException
javax.servlet.ServletException
action
public void action(AtmosphereResourceImpl actionEvent)
- Process an
AtmosphereServlet.Action from an ActionEvent operation like suspend, resume or timed out.
- Specified by:
action in interface CometSupport<AtmosphereResourceImpl>- Overrides:
action in class AsynchronousProcessor
- Parameters:
actionEvent - An instance of AtmosphereServlet.Action
cancelled
public AtmosphereServlet.Action cancelled(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse 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 HttpServletRequestres - the HttpServletResponse
- Returns:
- action the Action operation.
- Throws:
IOException
javax.servlet.ServletException
Copyright © 2012. All Rights Reserved.