edu.cmu.cs.able.gaugeInfrastructure
Interface GaugeMgr

All Known Implementing Classes:
RMIGaugeMgr, SienaGaugeMgr, SienaGaugeMgrHandle

public interface GaugeMgr

This interface is implemented by Gauge Managers, and allows a gauge to be created and deleted, or the type information about a gauge to be queried.


Method Summary
 GaugeControl createGauge(GaugeID gauge, StringPairVector setupParams, StringPairVector mappings)
          Creates a new gauge with the information specified.
 boolean deleteGauge(GaugeControl gauge)
          Deletes a gauge.
 java.lang.String getGaugeMgrID()
          Each gauge manager has a unique ID.
 boolean managesType(java.lang.String gaugeType)
          Determines whether this gauge manager can manage gauges of a particular type.
 boolean queryMetaInfo(java.lang.String gaugeType, StringPairVector configParamsMeta, StringPairVector valuesMeta)
          Fills in the type information for a gauge type.
 

Method Detail

getGaugeMgrID

public java.lang.String getGaugeMgrID()
Each gauge manager has a unique ID.
Returns:
The identifier of the gauge manager.

createGauge

public GaugeControl createGauge(GaugeID gauge,
                                StringPairVector setupParams,
                                StringPairVector mappings)
Creates a new gauge with the information specified.
Parameters:
gauge - The ID of the gauge to be created.
setupParams - The parameters with which to set up the gauge.
mappings - The mappings of values to model properties for how the gauge should report values.
Returns:
A new GaugeControl interface. Note that the GaugeID of this GaugeControl may be different to the GaugeID passed in as paramters. In particular, the modelName and uid may be different.

managesType

public boolean managesType(java.lang.String gaugeType)
Determines whether this gauge manager can manage gauges of a particular type.
Parameters:
gaugeType - The type of the gauge being queried
Returns:
true if the gauge manager managers this type; false otherwise.

deleteGauge

public boolean deleteGauge(GaugeControl gauge)
Deletes a gauge. A gauge will send out a final delete announcement so that all consumers can be informed.
Parameters:
gauge - The gauge to be deleted.
Returns:
true if the gauge was deleted; false otherwise.

queryMetaInfo

public boolean queryMetaInfo(java.lang.String gaugeType,
                             StringPairVector configParamsMeta,
                             StringPairVector valuesMeta)
Fills in the type information for a gauge type.
Parameters:
gaugeType - The type of the gauge for which information is being queried.
configParamsMeta - Filled in with the parameters that can be used to configure a gauge as (name, type) pairs.
valuesMeta - Filled in with the values that the gauge can report, as (name, type) pairs.
Returns:
true if the information could be determined; false otherwise.