Package org.atmosphere.cpr
Interface AsyncSupport<E extends AtmosphereResource>
-
- All Known Implementing Classes:
AsynchronousProcessor,BlockingIOCometSupport,GlassFishServ30WebSocketSupport,GlassFishServlet30WebSocketSupport,GlassFishv2CometSupport,GlassFishWebSocketSupport,Grizzly2CometSupport,Grizzly2WebSocketSupport,GrizzlyCometSupport,GrizzlyServlet30WebSocketSupport,JBossAsyncSupportWithWebSocket,JBossWebCometSupport,Jetty7CometSupport,Jetty93AsyncSupportWithWebSocket,Jetty9AsyncSupportWithWebSocket,JettyAsyncSupportWithWebSocket,JettyCometSupport,JettyServlet30AsyncSupportWithWebSocket,JSR356AsyncSupport,NettyCometSupport,Servlet30CometSupport,Tomcat7AsyncSupportWithWebSocket,Tomcat7BIOSupportWithWebSocket,Tomcat7CometSupport,Tomcat7Servlet30SupportWithWebSocket,TomcatCometSupport,WebLogicServlet30WithWebSocket
public interface AsyncSupport<E extends AtmosphereResource>Atmosphere's supported WebServer must implement this interface in order to be auto detected by theAtmosphereFramework. If theAtmosphereFrameworkfail to detect theAsyncSupport, it will use a blocking thread approach to emulate Comet using theBlockingIOCometSupport. Framework designers or Atmosphere application developers can also add their own implementation of that class by referencing their class within the atmosphere.xml file:<<atmosphere-handler ... comet-support="your.class.name">- Author:
- Jeanfrancois Arcand
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaction(E actionEvent)Process anActionfrom anActionEventoperation like suspend, resume or timed out.AsyncSupportcomplete(E r)Complete and close the connection associated with an implementation ofAtmosphereResourcejava.lang.StringgetContainerName()Return the name of the Java Web Server.voidinit(javax.servlet.ServletConfig sc)Initialize the WebServer using theServletConfigActionservice(AtmosphereRequest req, AtmosphereResponse res)booleansupportWebSocket()Return true if this implementation supports the websocket protocol.
-
-
-
Method Detail
-
getContainerName
java.lang.String getContainerName()
Return the name of the Java Web Server.- Returns:
- the name of the Java Web Server.
-
init
void init(javax.servlet.ServletConfig sc) throws javax.servlet.ServletException
Initialize the WebServer using theServletConfig- Parameters:
sc- theServletConfig- Throws:
javax.servlet.ServletException
-
service
Action service(AtmosphereRequest req, AtmosphereResponse res) throws java.io.IOException, javax.servlet.ServletException
- Parameters:
req- theAtmosphereRequestres- theAtmosphereResponse- Returns:
- the
Actionthat was manipulated by theAtmosphereHandler - Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
action
void action(E actionEvent)
Process anActionfrom anActionEventoperation like suspend, resume or timed out.- Parameters:
actionEvent- An instance ofAction
-
supportWebSocket
boolean supportWebSocket()
Return true if this implementation supports the websocket protocol.- Returns:
- true if supported
-
complete
AsyncSupport complete(E r)
Complete and close the connection associated with an implementation ofAtmosphereResource- Parameters:
r-AtmosphereResource- Returns:
- this
-
-