Package org.atmosphere.container
Class Tomcat7AsyncSupportWithWebSocket
java.lang.Object
org.atmosphere.cpr.AsynchronousProcessor
org.atmosphere.container.Tomcat7CometSupport
org.atmosphere.container.Tomcat7AsyncSupportWithWebSocket
- All Implemented Interfaces:
TomcatWebSocketUtil.Delegate,AsyncSupport<AtmosphereResourceImpl>
public class Tomcat7AsyncSupportWithWebSocket
extends Tomcat7CometSupport
implements TomcatWebSocketUtil.Delegate
Tomcat's WebSocket support. This code has been adapted from
WebSocketServlet-
Field Summary
Fields inherited from class org.atmosphere.container.Tomcat7CometSupport
COMET_EVENTFields inherited from class org.atmosphere.cpr.AsynchronousProcessor
cancelledAction, config, timedoutAction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoService(AtmosphereRequest req, AtmosphereResponse res) service(AtmosphereRequest req, AtmosphereResponse res) Invoked by the Tomcat AIO when a Comet request gets detected.booleanReturn true if this implementation supports the websocket protocol.Methods inherited from class org.atmosphere.container.Tomcat7CometSupport
action, cancelled, completeMethods inherited from class org.atmosphere.cpr.AsynchronousProcessor
allowSessionTimeoutRemoval, completeLifecycle, endRequest, getContainerName, init, invokeAtmosphereHandler, invokeInterceptors, map, postInterceptors, resumed, shutdown, supportSession, suspended, timedoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.atmosphere.container.TomcatWebSocketUtil.Delegate
suspended
-
Constructor Details
-
Tomcat7AsyncSupportWithWebSocket
-
-
Method Details
-
service
public Action service(AtmosphereRequest req, AtmosphereResponse res) throws IOException, javax.servlet.ServletException Description copied from class:Tomcat7CometSupportInvoked by the Tomcat AIO when a Comet request gets detected.- Specified by:
servicein interfaceAsyncSupport<AtmosphereResourceImpl>- Overrides:
servicein classTomcat7CometSupport- Parameters:
req- theAtmosphereRequestres- theAtmosphereResponse- Returns:
- the
Actionthat was manipulated by theAtmosphereHandler - Throws:
IOExceptionjavax.servlet.ServletException
-
doService
public Action doService(AtmosphereRequest req, AtmosphereResponse res) throws IOException, javax.servlet.ServletException - Specified by:
doServicein interfaceTomcatWebSocketUtil.Delegate- Throws:
IOExceptionjavax.servlet.ServletException
-
supportWebSocket
public boolean supportWebSocket()Description copied from interface:AsyncSupportReturn true if this implementation supports the websocket protocol.- Specified by:
supportWebSocketin interfaceAsyncSupport<AtmosphereResourceImpl>- Overrides:
supportWebSocketin classAsynchronousProcessor- Returns:
- true if supported
-