stella.io
Interface CacheChangedCaster

All Known Implementing Classes:
DummyRS485, JRS485Simulator, PollingRS485Server

public interface CacheChangedCaster

The interface describing generic casting capabilities of cache changed events. The method names follow the standard method names for registering and deregistering event listeners. Note, though, that different to other registration procedures, the listener in this case has to specify the serial command it wants to listen to.


Method Summary
 void addCacheChangedListener(CacheChangedListener ear, String key)
          Adds a listener to this caster.
 void removeCacheChangedListener(CacheChangedListener ear, String key)
          Deregisters a listener from this caster.
 

Method Detail

addCacheChangedListener

void addCacheChangedListener(CacheChangedListener ear,
                             String key)
Adds a listener to this caster. Whenever the cached value mapped to the specified key changes, the listener is notified with a CacheChangedEvent.

Parameters:
ear - The listener to be notified when the cache value changes.
key - The serial command this listenr is interested in.

removeCacheChangedListener

void removeCacheChangedListener(CacheChangedListener ear,
                                String key)
Deregisters a listener from this caster. Only the listening bound to the specified key is released. If the same listener is still listening for other serial commands, these bindings are untouched.

Parameters:
ear - The listener to be notified when the cache value changes.
key - The serial command this listenr is interested in.