VariableEvaluator

org.cougaar.core.qos.metrics.VariableEvaluator

Path specifications in the Metrics Service support a limited notion of variables for which actual values are substituted dynamically. The syntax is taken from make: $(var). The evaluation of such variables is handled by a user-supplied VariableEvaluator instance. The parsing and substitution is handled by the Metrics Service.

A useful base-class for classes which implement this interface StandardVariableEvaluator, which can supply values for the variables localagent, localnode and localhost.


String evaluateVariable(String var)

Given a variable reference in a path this method should return the String to be spliced in as a replacement. The argument is the variable name itself, without the $ or the parens.