| java.lang.Object org.cougaar.qos.qrs.ResourceContext
All known Subclasses: org.cougaar.qos.qrs.MethodDS, org.cougaar.qos.qrs.SiteFlowDS, org.cougaar.qos.qrs.ProcessDS, org.cougaar.qos.qrs.IpFlowDS, org.cougaar.qos.qrs.RSS, org.cougaar.qos.qrs.MvaDS, org.cougaar.qos.qrs.DeflectingContext, org.cougaar.qos.qrs.ClassDS, org.cougaar.qos.qrs.HostDS, org.cougaar.core.qos.rss.CougaarDS, org.cougaar.qos.qrs.IntegraterDS, org.cougaar.qos.qrs.AlarmDS,
ResourceContext | abstract public class ResourceContext implements Constants(Code) | | Abstract definition of a contect for resource data, ie a collection of
attributes bound over a set of parameter values. The attributes are
implemented as DataFormula instances.
|
Inner Class :public static class ParameterError extends Exception | |
Inner Class :public static class NoSuchMethodException extends Exception | |
Method Summary | |
protected void | addChild(Object id, ResourceContext child) | public void | bindSymbolValue(String symbol, Object value) | protected void | delete() | public List<String> | getContextClasses() Returns a list of the classes of any ResourceContexts that have been
instantiated so far. | protected String | getContextKind() | public List<ResourceContext> | getContextsForClass(String c) Returns a list of the ResourceContexts for a given class that have been
instantiated so far. | public DataFormula | getFormula(String kind, String[] args) | public List<String> | getFormulaKinds() Returns an list of Formula classes instantiated so far by this context. | public List<DataFormula> | getFormulasForKind(String kind) Returns a list of the Formulas for a given class that have been
instantiated so far. | protected Object | getID() | Object | getIdentifier(String kind, String[] parameters) | public String[] | getParameters() Returns a list of the parameter bindings. | public ResourceContext | getParent() Return the parent of this. | protected List<ResourceNode> | getPath() | public ResourceContext | getPathContext(ResourceNode[] path) | public DataFormula | getPathFormula(ResourceNode[] path) ResourceContext factory method, arbitrary depth. | public Object | getSymbolValue(String symbol) | public Object | getValue(String symbol) | abstract protected DataFormula | instantiateFormula(String formula_kind) | protected void | invoke(String method, String[] parameters) | protected Object | lookupSymbol(String symbol, String[] args, boolean resolve) | protected Object | nextLookup(String symbol, String[] args, boolean resolve) | protected boolean | paramEqual(Object x, Object y) | protected void | postInitialize() | protected ResourceContext | preferredParent(RSS root) | public static void | registerContextInstantiater(String kind, ContextInstantiater instantiater) | protected void | reinitializeFormulas() | protected void | removeChild(ResourceContext child) | protected ResourceContext | resolveSpec(String kind, String[] parameters) | ResourceContext | resolveSpec(Object id, String kind, String[] parameters) | protected void | setDependencies(ResourceNode[] dependencies) | protected void | setParent(ResourceContext parent) | protected void | setSymbolValue(String symbol, Object value) | public String | toString() | protected void | unbindSymbolValue(String symbol) | protected boolean | useParentPath() | abstract protected void | verifyParameters(String[] parameters) Subclasses should provide this method. |
ResourceContext | protected ResourceContext(String[] parameters, ResourceContext parent) throws ParameterError(Code) | | Standard constructor. It verifies the parameters and adds the context to
the list of known contexts.
|
delete | protected void delete()(Code) | | |
getContextClasses | public List<String> getContextClasses()(Code) | | Returns a list of the classes of any ResourceContexts that have been
instantiated so far. This is only used by the ResourceContext gui.
|
getContextsForClass | public List<ResourceContext> getContextsForClass(String c)(Code) | | Returns a list of the ResourceContexts for a given class that have been
instantiated so far. This is only used by the ResourceContext gui.
|
getFormulaKinds | public List<String> getFormulaKinds()(Code) | | Returns an list of Formula classes instantiated so far by this context.
Only used by the ResourceContext gui.
|
getFormulasForKind | public List<DataFormula> getFormulasForKind(String kind)(Code) | | Returns a list of the Formulas for a given class that have been
instantiated so far. This is only used by the ResourceContext gui.
|
getParameters | public String[] getParameters()(Code) | | Returns a list of the parameter bindings. So far this is only used by the
ResourceContext gui.
|
postInitialize | protected void postInitialize()(Code) | | |
reinitializeFormulas | protected void reinitializeFormulas()(Code) | | |
unbindSymbolValue | protected void unbindSymbolValue(String symbol)(Code) | | |
useParentPath | protected boolean useParentPath()(Code) | | |
verifyParameters | abstract protected void verifyParameters(String[] parameters) throws ParameterError(Code) | | Subclasses should provide this method. It should verify that the given
parameters are correct in number, position, type and value, throwing
ParameterError if not.
|
|
|