org.atmosphere.cache
Class OnReconnectBroadcasterCache

java.lang.Object
  extended by org.atmosphere.cache.OnReconnectBroadcasterCache
All Implemented Interfaces:
BroadcasterCache

public class OnReconnectBroadcasterCache
extends Object
implements BroadcasterCache

Same as the HeaderBroadcasterCache, but will not send anything if the user connect for the first time.

Author:
Jeanfrancois Arcand

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.atmosphere.cpr.BroadcasterCache
BroadcasterCache.STRATEGY
 
Field Summary
 
Fields inherited from interface org.atmosphere.cpr.BroadcasterCache
BROADCASTER_CACHE_TRACKER
 
Constructor Summary
OnReconnectBroadcasterCache()
           
 
Method Summary
 void addToCache(String id, AtmosphereResource r, Object e)
          Start tracking messages associated with AtmosphereResource from 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

OnReconnectBroadcasterCache

public OnReconnectBroadcasterCache()
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,
                       Object e)
Description copied from interface: BroadcasterCache
Start tracking messages associated with AtmosphereResource from the cache

Specified by:
addToCache in interface BroadcasterCache
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
r - AtmosphereResource
Returns:
a List of messages (String).


Copyright © 2013. All Rights Reserved.