| java.lang.Object org.cougaar.qos.qrs.AbstractDataFeed org.cougaar.qos.qrs.StandardDataFeed
StandardDataFeed | abstract public class StandardDataFeed extends AbstractDataFeed (Code) | | This class is provides listener support and a simple caching scheme. Despite
the name, it's not particularly 'standard', in fact it's really only suitable
for feeds which want to avoid calculating values on the fly, because of the
expense involved. The only uses so far seem to be Remos and Erni.
|
addListenerForKey | public void addListenerForKey(DataFeedListener listener, String key)(Code) | | Add a listener for the given key. Whenever a new value for this key
enters the store, all listeners will be notified. This method is part of
the DataFeed interface.
|
lookup | public DataValue lookup(String key)(Code) | | The query interface. A real value is returned iff the key is meaningful
for this feed and a value is currently cached. No computation or updating
happens here.
|
removeListenerForKey | public void removeListenerForKey(DataFeedListener listener, String key)(Code) | | Remove a listener for the given key. This method is part of the DataFeed
interface.
|
updateAll | protected void updateAll()(Code) | | Forces and caches an update of all listener keys.
|
updateValue | abstract protected DataValue updateValue(String key)(Code) | | This method does the real work of finding the current value associated
with the given key. This should not usually be called as part of a query
(ie from lookup, either directly or indirectly).
|
updateValueForKey | protected void updateValueForKey(String key, boolean notify)(Code) | | Subclasses should call this to force an update of the cache. The second
arg indicates whether or not the listeners should be notified.
|
validateKey | abstract protected boolean validateKey(String key)(Code) | | Subclass method should return true here iff the key is relevant to the
subclass. If the key is not valid, the subclass will never be asked to
compute a value for it.
|
|
|