public class BlockingIOCometSupport extends AsynchronousProcessor
AtmosphereFramework fails to autodetect
the Servlet Container we are running on.
This AsyncSupport implementation uses a blocking approach, meaning
the request thread will be blocked until another Thread invoke the Broadcaster.broadcast(java.lang.Object).| Modifier and Type | Field and Description |
|---|---|
protected static String |
LATCH |
cancelledAction, config, timedoutAction| Constructor and Description |
|---|
BlockingIOCometSupport(AtmosphereConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
action(AtmosphereResourceImpl r)
Process an
Action from an ActionEvent operation like suspend, resume or timed out. |
Action |
cancelled(AtmosphereRequest req,
AtmosphereResponse res)
All proprietary Comet based
Servlet must invoke the cancelled method when the underlying WebServer
detect that the client closed the connection. |
AsyncSupport |
complete(AtmosphereResourceImpl r)
Complete and close the connection associated with an implementation of
AtmosphereResource |
Action |
service(AtmosphereRequest req,
AtmosphereResponse res)
|
protected void |
suspend(Action action,
AtmosphereRequest req,
AtmosphereResponse res)
Suspend the connection by blocking the current
Thread |
allowSessionTimeoutRemoval, completeLifecycle, endRequest, getContainerName, init, invokeAtmosphereHandler, invokeInterceptors, map, postInterceptors, resumed, shutdown, supportSession, supportWebSocket, suspended, timedoutprotected static final String LATCH
public BlockingIOCometSupport(AtmosphereConfig config)
public Action service(AtmosphereRequest req, AtmosphereResponse res) throws IOException, javax.servlet.ServletException
AsyncSupportreq - the AtmosphereRequestres - the AtmosphereResponseAction that was manipulated by the AtmosphereHandlerIOExceptionjavax.servlet.ServletExceptionprotected void suspend(Action action, AtmosphereRequest req, AtmosphereResponse res) throws IOException, javax.servlet.ServletException
Threadaction - The Actionreq - the AtmosphereRequestres - the AtmosphereResponseIOExceptionjavax.servlet.ServletExceptionpublic Action cancelled(AtmosphereRequest req, AtmosphereResponse res) throws IOException, javax.servlet.ServletException
AsynchronousProcessorServlet must invoke the cancelled method when the underlying WebServer
detect that the client closed the connection.cancelled in class AsynchronousProcessorreq - the AtmosphereRequestres - the AtmosphereResponseIOExceptionjavax.servlet.ServletExceptionpublic void action(AtmosphereResourceImpl r)
AsyncSupportAction from an ActionEvent operation like suspend, resume or timed out.action in interface AsyncSupport<AtmosphereResourceImpl>action in class AsynchronousProcessorr - An instance of Actionpublic AsyncSupport complete(AtmosphereResourceImpl r)
AsyncSupportAtmosphereResourcecomplete in interface AsyncSupport<AtmosphereResourceImpl>complete in class AsynchronousProcessorr - AtmosphereResourceCopyright © 2016. All rights reserved.