org.atmosphere.container
Class NettyCometSupport

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

public class NettyCometSupport
extends AsynchronousProcessor

Netty's Framework AsyncSupport and framework running on top of it, like vert.x and Play!


Field Summary
static String RESUME
           
static String SUSPEND
           
 
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
cancelledAction, config, timedoutAction
 
Constructor Summary
NettyCometSupport(AtmosphereConfig config)
           
 
Method Summary
 void action(AtmosphereResourceImpl r)
          Process an Action from an ActionEvent operation like suspend, resume or timed out.
 AsyncSupport complete(AtmosphereResourceImpl r)
          Complete and close the connection associated with an implementation of AtmosphereResource
 Action service(AtmosphereRequest req, AtmosphereResponse res)
          Serve the AtmosphereRequest and the AtmosphereResponse and return the appropriate Action.
 boolean supportWebSocket()
          Return true if this implementation supports the websocket protocol.
 
Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor
allowSessionTimeoutRemoval, cancelled, completeLifecycle, endRequest, getContainerName, init, invokeAtmosphereHandler, invokeInterceptors, map, postInterceptors, 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
Constructor Detail

NettyCometSupport

public NettyCometSupport(AtmosphereConfig config)
Method Detail

service

public Action service(AtmosphereRequest req,
                      AtmosphereResponse res)
               throws IOException,
                      javax.servlet.ServletException
Description copied from interface: AsyncSupport
Serve the AtmosphereRequest and the AtmosphereResponse and return the appropriate Action.

Parameters:
req - the AtmosphereRequest
res - the AtmosphereResponse
Returns:
the Action that was manipulated by the AtmosphereHandler
Throws:
IOException
javax.servlet.ServletException

action

public void action(AtmosphereResourceImpl r)
Description copied from interface: AsyncSupport
Process an Action from an ActionEvent operation like suspend, resume or timed out.

Specified by:
action in interface AsyncSupport<AtmosphereResourceImpl>
Overrides:
action in class AsynchronousProcessor
Parameters:
r - An instance of Action

supportWebSocket

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

Specified by:
supportWebSocket in interface AsyncSupport<AtmosphereResourceImpl>
Overrides:
supportWebSocket in class AsynchronousProcessor
Returns:
true if supported

complete

public AsyncSupport complete(AtmosphereResourceImpl r)
Description copied from interface: AsyncSupport
Complete and close the connection associated with an implementation of AtmosphereResource

Specified by:
complete in interface AsyncSupport<AtmosphereResourceImpl>
Overrides:
complete in class AsynchronousProcessor
Parameters:
r - AtmosphereResource
Returns:
this


Copyright © 2014. All Rights Reserved.