org.atmosphere.container
Class NettyCometSupport

java.lang.Object
  extended by org.atmosphere.cpr.AsynchronousProcessor
      extended by org.atmosphere.container.NettyCometSupport
All Implemented Interfaces:
CometSupport<AtmosphereResourceImpl>

public class NettyCometSupport
extends AsynchronousProcessor

Netty's Framework CometSupport


Nested Class Summary
 class NettyCometSupport.CometSupportHook
           
 
Field Summary
static String CHANNEL
           
static String HOOK
           
static String RESUME
           
static String SUSPEND
           
 
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
aliveRequests, cancelledAction, config, timedoutAction
 
Constructor Summary
NettyCometSupport(AtmosphereConfig config)
           
 
Method Summary
 void action(AtmosphereResourceImpl r)
          Process an AtmosphereServlet.Action from an ActionEvent operation like suspend, resume or timed out.
 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.
 boolean supportWebSocket()
          Return true if this implementation supports the websocket protocol.
 
Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor
cancelled, destroyResource, getContainerName, init, map, map, resumed, shutdown, supportSession, suspended, timedout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUSPEND

public static final String SUSPEND

RESUME

public static final String RESUME

HOOK

public static final String HOOK

CHANNEL

public static final String CHANNEL
Constructor Detail

NettyCometSupport

public NettyCometSupport(AtmosphereConfig config)
Method Detail

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 HttpServletRequest
res - the HttpServletResponse
Returns:
the AtmosphereServlet.Action that was manipulated by the AtmosphereHandler
Throws:
IOException
javax.servlet.ServletException

action

public void action(AtmosphereResourceImpl r)
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:
r - An instance of AtmosphereServlet.Action

supportWebSocket

public boolean supportWebSocket()
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 © 2012. All Rights Reserved.