org.atmosphere.cpr
Class BroadcasterConfig.DefaultBroadcasterCache

java.lang.Object
  extended by org.atmosphere.cpr.BroadcasterConfig.DefaultBroadcasterCache
All Implemented Interfaces:
BroadcasterCache
Enclosing class:
BroadcasterConfig

public static class BroadcasterConfig.DefaultBroadcasterCache
extends Object
implements BroadcasterCache


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.atmosphere.cpr.BroadcasterCache
BroadcasterCache.Message, BroadcasterCache.STRATEGY
 
Constructor Summary
BroadcasterConfig.DefaultBroadcasterCache()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BroadcasterConfig.DefaultBroadcasterCache

public BroadcasterConfig.DefaultBroadcasterCache()
Method Detail

start

public void start()
Description copied from interface: BroadcasterCache
Start

Specified by:
start in interface BroadcasterCache

stop

public void stop()
Description copied from interface: BroadcasterCache
Stop

Specified by:
stop in interface BroadcasterCache

addToCache

public void addToCache(String id,
                       AtmosphereResource r,
                       BroadcasterCache.Message e)
Description copied from interface: BroadcasterCache
Start tracking messages associated with AtmosphereResource from the cache

Specified by:
addToCache in interface BroadcasterCache
Parameters:
id - The associated Broadcaster#addAtmosphereResource(AtmosphereResource).getID
r - AtmosphereResource
e - a broadcasted message.

retrieveFromCache

public List<Object> retrieveFromCache(String id,
                                      AtmosphereResource r)
Description copied from interface: BroadcasterCache
Retrieve messages associated with AtmosphereResource

Specified by:
retrieveFromCache in interface BroadcasterCache
Parameters:
id - The associated Broadcaster#addAtmosphereResource(AtmosphereResource).getID
r - AtmosphereResource
Returns:
a List of messages (String).

inspector

public BroadcasterCache inspector(BroadcasterCacheInspector interceptor)
Description copied from interface: BroadcasterCache
Add a BroadcasterCacheInspector that will be invoked before a message gets added to the cache.

Specified by:
inspector in interface BroadcasterCache
Returns:


Copyright © 2012. All Rights Reserved.