Package org.atmosphere.cpr
Interface AsyncSupport<E extends AtmosphereResource>
- All Known Implementing Classes:
AsynchronousProcessor,BlockingIOCometSupport,JSR356AsyncSupport,NettyCometSupport,Servlet30CometSupport
public interface AsyncSupport<E extends AtmosphereResource>
Atmosphere's supported WebServer must implement this interface in order to be auto detected by the
AtmosphereFramework. If the AtmosphereFramework fail to detect the AsyncSupport, it will
use a blocking thread approach to emulate Comet using the BlockingIOCometSupport.
Framework designers or Atmosphere application developers can also add their own implementation of that class by
referencing their class within the atmosphere.xml file:
invalid input: '<'<atmosphere-handler ... comet-support="your.class.name">
- Author:
- Jeanfrancois Arcand
-
Method Summary
Modifier and TypeMethodDescriptionvoidProcess anActionfrom anActionEventoperation like suspend, resume or timed out.Complete and close the connection associated with an implementation ofAtmosphereResourceReturn the name of the Java Web Server.voidinit(jakarta.servlet.ServletConfig sc) Initialize the WebServer using theServletConfigservice(AtmosphereRequest req, AtmosphereResponse res) booleanReturn true if this implementation supports the websocket protocol.
-
Method Details
-
getContainerName
String getContainerName()Return the name of the Java Web Server.- Returns:
- the name of the Java Web Server.
-
init
void init(jakarta.servlet.ServletConfig sc) throws jakarta.servlet.ServletException Initialize the WebServer using theServletConfig- Parameters:
sc- theServletConfig- Throws:
jakarta.servlet.ServletException
-
service
Action service(AtmosphereRequest req, AtmosphereResponse res) throws IOException, jakarta.servlet.ServletException - Parameters:
req- theAtmosphereRequestres- theAtmosphereResponse- Returns:
- the
Actionthat was manipulated by theAtmosphereHandler - Throws:
IOExceptionjakarta.servlet.ServletException
-
action
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
Complete and close the connection associated with an implementation ofAtmosphereResource- Parameters:
r-AtmosphereResource- Returns:
- this
-