org.atmosphere.container
Class JBossWebSocketSupport

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

public class JBossWebSocketSupport
extends AsynchronousProcessor

JBoss AS7 websocket support based on Mike Brock's websockets implementation.

Author:
Péter Miklós
See Also:
https://github.com/mikebrock/jboss-websockets

Nested Class Summary
 
Nested classes/interfaces inherited from class org.atmosphere.cpr.AsynchronousProcessor
AsynchronousProcessor.AsynchronousProcessorHook
 
Field Summary
 
Fields inherited from class org.atmosphere.cpr.AsynchronousProcessor
aliveRequests, cancelledAction, config, timedoutAction
 
Constructor Summary
JBossWebSocketSupport(AtmosphereConfig config)
           
 
Method Summary
 void dispatch(org.jboss.servlet.http.HttpEvent httpEvent)
           
 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
action, cancelled, completeLifecycle, getContainerName, init, invokeAtmosphereHandler, map, resumed, shutdown, supportSession, suspended, timedout, trackActiveRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBossWebSocketSupport

public JBossWebSocketSupport(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

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.