public class AtmosphereResourceStateRecovery extends Object implements AtmosphereInterceptor
AtmosphereResource to all Broadcaster the resource was added before
the underlying connection got closed and resume. This allow an application to restore the state of the client before the
disconnection occurred, and for the long-polling transport to return to it's previous state.| Modifier and Type | Class and Description |
|---|---|
class |
AtmosphereResourceStateRecovery.B |
static class |
AtmosphereResourceStateRecovery.BroadcasterTracker |
static class |
AtmosphereResourceStateRecovery.OnAlwaysSuspend |
| Constructor and Description |
|---|
AtmosphereResourceStateRecovery() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(AtmosphereConfig config)
Configure an AtmosphereFramework object.
|
void |
destroy()
Clean the AtmosphereInterceptor when removed or when the Atmosphere is undeployed.
|
Action |
inspect(AtmosphereResource r)
Invoked before an
AtmosphereResource gets dispatched to AtmosphereHandler. |
void |
postInspect(AtmosphereResource r)
Invoked after an
AtmosphereResource gets dispatched to AtmosphereHandler. |
List<Object> |
retrieveCache(AtmosphereResource r,
AtmosphereResourceStateRecovery.BroadcasterTracker tracker,
boolean force) |
protected void |
startStateTracker() |
ConcurrentHashMap<String,AtmosphereResourceStateRecovery.BroadcasterTracker> |
states() |
long |
timeout() |
AtmosphereResourceStateRecovery |
timeout(long timeout) |
String |
toString() |
public void configure(AtmosphereConfig config)
AtmosphereConfigAwareconfigure in interface AtmosphereConfigAwareconfig - AtmosphereConfigpublic AtmosphereResourceStateRecovery timeout(long timeout)
public long timeout()
protected void startStateTracker()
public Action inspect(AtmosphereResource r)
AtmosphereInterceptorAtmosphereResource gets dispatched to AtmosphereHandler.inspect in interface AtmosphereInterceptorr - a AtmosphereResourceAction.CONTINUE or Action.SUSPEND
to dispatch the AtmosphereResource to other AtmosphereInterceptor or AtmosphereHandler.
Return Action.TYPE.CANCELLED to stop the processing.public void postInspect(AtmosphereResource r)
AtmosphereInterceptorAtmosphereResource gets dispatched to AtmosphereHandler.postInspect in interface AtmosphereInterceptorr - a AtmosphereResourcepublic void destroy()
AtmosphereInterceptordestroy in interface AtmosphereInterceptorpublic ConcurrentHashMap<String,AtmosphereResourceStateRecovery.BroadcasterTracker> states()
public List<Object> retrieveCache(AtmosphereResource r, AtmosphereResourceStateRecovery.BroadcasterTracker tracker, boolean force)
Copyright © 2016. All rights reserved.