edu.cmu.cs.able.gauges.RMI
Class RMITimeGauge
java.lang.Object
|
+--edu.cmu.cs.able.gaugeInfrastructure.RMI.RMIGauge
|
+--edu.cmu.cs.able.gauges.RMI.RMITimeGauge
- All Implemented Interfaces:
- edu.cmu.cs.able.gaugeInfrastructure.GaugeControl, java.io.Serializable
- public class RMITimeGauge
- extends edu.cmu.cs.able.gaugeInfrastructure.RMI.RMIGauge
Implements a gauge that periodically reports the time.
- See Also:
- Serialized Form
Field Summary |
protected java.lang.String |
gaugeType
|
Fields inherited from class edu.cmu.cs.able.gaugeInfrastructure.RMI.RMIGauge |
busHost, configParams, creatorID, gaugeBus, gaugeID, mappings, setupParams |
Constructor Summary |
RMITimeGauge(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeID gaugeID,
java.lang.String creatorID,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setupParams,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings)
Creates new RMITimeGauge |
Method Summary |
boolean |
configure(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams)
This method is used to configure the gauge. |
static void |
main(java.lang.String[] args)
A command-line interface to start the gauge. |
boolean |
queryAllValues(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeValueVector values)
|
boolean |
queryState(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setupParams,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings)
Returns the state of the gauge. |
java.lang.String |
queryValue(java.lang.String valueName)
|
Methods inherited from class edu.cmu.cs.able.gaugeInfrastructure.RMI.RMIGauge |
delete, getConfigParams, getConfigParamsSize, getGaugeID, getSetupParams, getSetupParamsSize, init, register |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
gaugeType
protected java.lang.String gaugeType
RMITimeGauge
public RMITimeGauge(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeID gaugeID,
java.lang.String creatorID,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setupParams,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings)
- Creates new RMITimeGauge
- Parameters:
mappings
- Contains the mapping between each value and a higher level modelgaugeID
- The ID of the gauge to create.creatorID
- The ID of the gauge manager that is creating the gauge.setupParams
- The value of the setup params.
queryState
public boolean queryState(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setupParams,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings)
- Returns the state of the gauge.
- Overrides:
queryState
in class edu.cmu.cs.able.gaugeInfrastructure.RMI.RMIGauge
- Parameters:
setupParams
- The vector into which the setup parameters are copied. Will be
empty for this gauge.configParams
- The configuration parameters for this gauge. Will have
an element for frequency
and report
.mappings
- The property that each gauge value is associated with.
Will have an element for date
.- Returns:
- Whether the state of the gauge could be queried.
configure
public boolean configure(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams)
- This method is used to configure the gauge.
- Overrides:
configure
in class edu.cmu.cs.able.gaugeInfrastructure.RMI.RMIGauge
- Parameters:
configParams
- The parameters used to configure the gauge. For the
SienaTimeGauge, the valid configuration parameters are:
frequency : int (millisecond period of reporting)
report : true (whether the gauge should report a value)- Returns:
- Whether the gauge was successfully configured.
queryAllValues
public boolean queryAllValues(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeValueVector values)
- Overrides:
queryAllValues
in class edu.cmu.cs.able.gaugeInfrastructure.RMI.RMIGauge
queryValue
public java.lang.String queryValue(java.lang.String valueName)
- Overrides:
queryValue
in class edu.cmu.cs.able.gaugeInfrastructure.RMI.RMIGauge
main
public static void main(java.lang.String[] args)
- A command-line interface to start the gauge.
- Parameters:
args
- -gt gauge type
-gn gauge name
-mt model type
-mn model name
[-setup name=value]
[-mappings name=property]
-creator creator ID