|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.interceptor.AtmosphereResourceStateRecovery
public class AtmosphereResourceStateRecovery
This interceptor associates a 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.
| Nested Class Summary | |
|---|---|
class |
AtmosphereResourceStateRecovery.B
|
static class |
AtmosphereResourceStateRecovery.BroadcasterTracker
|
static class |
AtmosphereResourceStateRecovery.OnAlwaysSuspend
|
| Constructor Summary | |
|---|---|
AtmosphereResourceStateRecovery()
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AtmosphereResourceStateRecovery()
| Method Detail |
|---|
public void configure(AtmosphereConfig config)
AtmosphereConfigAware
configure 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 AtmosphereResource
Action.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()
AtmosphereInterceptor
destroy in interface AtmosphereInterceptorpublic ConcurrentHashMap<String,AtmosphereResourceStateRecovery.BroadcasterTracker> states()
public String toString()
toString in class Object
public List<Object> retrieveCache(AtmosphereResource r,
AtmosphereResourceStateRecovery.BroadcasterTracker tracker,
boolean force)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||