|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BroadcasterCache
A BroadcasterCache is used to persist broadcasted Object Broadcaster.broadcast(Object). Disconnected clients
can always retrieve message that were broadcasted during their "downtime". BroadcasterCache are useful when
a the long polling technique is used and prevent application from loosing event between re-connection.
BroadcasterConfig.setBroadcasterCache(BroadcasterCache) by
defining it in your web/application.xml or by using the BroadcasterCacheService
| Nested Class Summary | |
|---|---|
static class |
BroadcasterCache.Message
A wrapper around a the object passed to Broadcaster.broadcast(Object) |
static class |
BroadcasterCache.STRATEGY
|
| Method Summary | |
|---|---|
void |
addToCache(String id,
AtmosphereResource r,
BroadcasterCache.Message e)
Start tracking messages associated with AtmosphereResource from the cache |
BroadcasterCache |
inspector(BroadcasterCacheInspector interceptor)
Add a BroadcasterCacheInspector that will be invoked before a message gets added to the cache. |
List<Object> |
retrieveFromCache(String id,
AtmosphereResource r)
Retrieve messages associated with AtmosphereResource |
void |
start()
Start |
void |
stop()
Stop |
| Method Detail |
|---|
void start()
void stop()
void addToCache(String id,
AtmosphereResource r,
BroadcasterCache.Message e)
AtmosphereResource from the cache
id - The associated Broadcaster#addAtmosphereResource(AtmosphereResource).getIDr - AtmosphereResourcee - a broadcasted message.
List<Object> retrieveFromCache(String id,
AtmosphereResource r)
AtmosphereResource
id - The associated Broadcaster#addAtmosphereResource(AtmosphereResource).getIDr - AtmosphereResource
List of messages (String).BroadcasterCache inspector(BroadcasterCacheInspector interceptor)
BroadcasterCacheInspector that will be invoked before a message gets added to the cache.
interceptor -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||