org.atmosphere.container
Class JBossAsyncSupportWithWebSocket

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

public class JBossAsyncSupportWithWebSocket
extends JBossWebCometSupport

JBoss's WebSocket support. This code has been adapted from Tomcat7AsyncSupportWithWebSocket and TomcatWebSocketUtil


Field Summary
 
Fields inherited from class org.atmosphere.container.JBossWebCometSupport
HTTP_EVENT
 
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
cancelledAction, config, timedoutAction
 
Constructor Summary
JBossAsyncSupportWithWebSocket(AtmosphereConfig config)
           
 
Method Summary
 void dispatch(org.jboss.servlet.http.HttpEvent httpEvent)
           
 Action doService(AtmosphereRequest req, AtmosphereResponse res)
           
 Action service(AtmosphereRequest req, AtmosphereResponse res)
          Invoked by the Tomcat AIO when a Comet request gets detected.
 boolean supportWebSocket()
          Return true if this implementation supports the websocket protocol.
 
Methods inherited from class org.atmosphere.container.JBossWebCometSupport
action, cancelled, complete
 
Methods inherited from class org.atmosphere.cpr.AsynchronousProcessor
allowSessionTimeoutRemoval, 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
 

Constructor Detail

JBossAsyncSupportWithWebSocket

public JBossAsyncSupportWithWebSocket(AtmosphereConfig config)
Method Detail

service

public Action service(AtmosphereRequest req,
                      AtmosphereResponse res)
               throws IOException,
                      javax.servlet.ServletException
Description copied from class: JBossWebCometSupport
Invoked by the Tomcat AIO when a Comet request gets detected.

Specified by:
service in interface AsyncSupport<AtmosphereResourceImpl>
Overrides:
service in class JBossWebCometSupport
Parameters:
req - the AtmosphereRequest
res - the AtmosphereResponse
Returns:
the Action that was manipulated by the AtmosphereHandler
Throws:
IOException
javax.servlet.ServletException

doService

public Action doService(AtmosphereRequest req,
                        AtmosphereResponse res)
                 throws IOException,
                        javax.servlet.ServletException
Throws:
IOException
javax.servlet.ServletException

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

dispatch

public void dispatch(org.jboss.servlet.http.HttpEvent httpEvent)
              throws IOException,
                     javax.servlet.ServletException
Parameters:
httpEvent -
Throws:
javax.servlet.ServletException
IOException


Copyright © 2014. All Rights Reserved.