| java.lang.Object org.cougaar.qos.qrs.DataFormula
All known Subclasses: org.cougaar.qos.qrs.ProxyFormula, org.cougaar.qos.qrs.PollingIntegral, org.cougaar.qos.qrs.Aggregator, org.cougaar.core.qos.rss.DecayingHistoryFormula,
DataFormula | abstract public class DataFormula implements DataValueChangedCallbackListener,Constants(Code) | | A DataFormula describes a (possibly computed) attribute of a ResourceContext.
DataFormulas are gotten from the corresponding context, by name. In general
the name will be a toplevel static inner class of the context (which implies
only one formula per type).
|
Inner Class :public static class Values extends HashMap | |
Method Summary | |
public DataValue | blockingQuery() Computes and returns a new value. | protected DataValue | computeValue(boolean forwardChain) | void | contextDeleted() | public void | dataValueChanged(DataFormula changedFormula) Implements the DataValueChangedCallbackListener. | abstract protected DataValue | doCalculation(Values values) Instantiable subclasses provide this to do the formula's work, if there's
any to do. | public void | formulaDeleted(DataFormula formula) | public String[] | getArgs() | protected DataValue | getCachedValue() | protected ResourceContext | getContext() | public List<DataFormula> | getDependencies() Returns a list of other formulas on which this one depends. | public String | getName() | protected List<ResourceNode> | getPath() | public List<DataValueChangedCallbackListener> | getSubscribers() Returns a list of listeners on this formula. | protected boolean | hasArgs(String[] args) | protected void | initialize(ResourceContext context) | protected void | postInitialize() | public DataValue | query() Returns the currently cached value. | protected void | registerDependency(DataFormula formula, String key) | protected DataFormula | registerDependency(ResourceContext context, String formulaName) | protected DataFormula | registerDependency(ResourceContext context, String formulaName, String[] formulaArgs) | protected DataFormula | registerDependency(ResourceContext context, String formulaName, String key) | protected DataFormula | registerDependency(ResourceContext context, String formulaName, String[] formulaArgs, String key) | public void | reinitialize() | protected void | setArgs(String[] args) | protected synchronized void | setCachedValue(DataValue cachedValue) | protected void | setName(String name) | public boolean | shouldNotify(DataValue value) | public void | subscribe(DataValueChangedCallbackListener listener) Registers the listener so that will be called back when the value of this
one changes. | public String | toString() | public void | unsubscribe(DataValueChangedCallbackListener listener) Unregisters the listener for callbackes. |
blockingQuery | public DataValue blockingQuery()(Code) | | Computes and returns a new value. This is part of the standard (non-gui)
DataFormula interface.
|
contextDeleted | void contextDeleted()(Code) | | |
dataValueChanged | public void dataValueChanged(DataFormula changedFormula)(Code) | | Implements the DataValueChangedCallbackListener. This would typically be
called here when one of the other formulas on which this one depends has
a new value.
|
doCalculation | abstract protected DataValue doCalculation(Values values)(Code) | | Instantiable subclasses provide this to do the formula's work, if there's
any to do.
|
getDependencies | public List<DataFormula> getDependencies()(Code) | | Returns a list of other formulas on which this one depends. Only used by
the ResourceContext gui (so far).
|
postInitialize | protected void postInitialize()(Code) | | |
query | public DataValue query()(Code) | | Returns the currently cached value. This is part of the standard
(non-gui) DataFormula interface.
|
reinitialize | public void reinitialize()(Code) | | |
setCachedValue | protected synchronized void setCachedValue(DataValue cachedValue)(Code) | | |
subscribe | public void subscribe(DataValueChangedCallbackListener listener)(Code) | | Registers the listener so that will be called back when the value of this
one changes. This is part of standard (non-gui) DataFormula interface.
|
|
|