edu.cmu.cs.able.gaugeInfrastructure
Interface GaugeConsumer

All Known Implementing Classes:
RMIGaugeConsumer, SienaGaugeConsumer

public interface GaugeConsumer

The GaugeConsumer interface must be implemented by classes that are intended to create, control, and/or listen to gauges. The methods in this interface define the callbacks that are invoked when gauges report values or information about their status.


Method Summary
 void onReportConfigured(GaugeControl gauge, StringPairVector configParams)
          The callback invoked when a gauge has been configured.
 void onReportCreated(GaugeControl gauge)
          The callback invoked when a gauge is created.
 void onReportDeleted(GaugeControl gauge)
          The callback invoked when a gauge is deleted by (another) consumer.
 void onReportMultipleValues(GaugeControl gauge, GaugeValueVector values)
          The callback invoked when a gauge reports multiple values in a single reporting action.
 void onReportValue(GaugeControl gauge, java.lang.String valueName, java.lang.String propertyName, java.lang.String value)
          The callback invoked when a gauge reports a single value.
 

Method Detail

onReportValue

public void onReportValue(GaugeControl gauge,
                          java.lang.String valueName,
                          java.lang.String propertyName,
                          java.lang.String value)
The callback invoked when a gauge reports a single value.
Parameters:
gauge - The Gauge that reported the value.
valueName - The name of the value (according to the gauge)
propertyName - The property name that the value is associated with. The property is the interpretation of the value according to a high level model. This association is established when the gauge is created.
value - The value reported by the gauge.

onReportMultipleValues

public void onReportMultipleValues(GaugeControl gauge,
                                   GaugeValueVector values)
The callback invoked when a gauge reports multiple values in a single reporting action.
Parameters:
gauge - Theg gauge reporting the value
values - The values reported. Each element of the vector is a (valueName, propertyName, value) tuple.

onReportConfigured

public void onReportConfigured(GaugeControl gauge,
                               StringPairVector configParams)
The callback invoked when a gauge has been configured. Because a gauge can have multiple consumers, all consumers must know when a gauge has been reconfigured. The gauge announces this when any consumer configures it.
Parameters:
gauge - The gauge that was configured.
configParams - The new configuration parameters for the gauge.

onReportDeleted

public void onReportDeleted(GaugeControl gauge)
The callback invoked when a gauge is deleted by (another) consumer. After this callback is invoked, the gauge consumer can expect no more events (or callbacks) from this particular gauge.
Parameters:
gauge - The gauge that was deleted.

onReportCreated

public void onReportCreated(GaugeControl gauge)
The callback invoked when a gauge is created.
Parameters:
gauge - The gauge that was created.