edu.cmu.cs.able.gaugeInfrastructure.Siena
Class SienaGaugeReportingBus
java.lang.Object
|
+--edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGaugeReportingBus
- All Implemented Interfaces:
- GaugeReportingBus, siena.Notifiable
- public class SienaGaugeReportingBus
- extends java.lang.Object
- implements GaugeReportingBus, siena.Notifiable
Method Summary |
static GaugeReportingBus |
getReportingBus()
|
void |
notify(siena.Notification e)
|
void |
notify(siena.Notification[] e)
|
void |
registerGauge(GaugeControl gauge,
StringPairVector setupParams,
StringPairVector mappings,
boolean waitForInit,
java.lang.String myManagerID)
|
boolean |
reportConfigured(GaugeID gauge,
StringPairVector configParams)
Called when a gauge has been configured. |
boolean |
reportCreated(GaugeID gauge)
The first event produced by the gauge. |
boolean |
reportDeleted(GaugeID gauge)
This event is sent as the last act of the gauge before it is
destroyed. |
boolean |
reportMultipleValues(GaugeID gauge,
GaugeValueVector values)
Called by a gauge when it reports multiple values. |
boolean |
reportValue(GaugeID gauge,
java.lang.String valueName,
java.lang.String propertyName,
java.lang.String value)
Called by a gauge when it reports a value. |
void |
subscribeToGaugeEvent(GaugeEvent event,
<>Subscriber subscriber)
|
void |
unsubscribeToGaugeEvent(GaugeEvent event,
<>Subscriber subscriber)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sienaBus
public static SienaEventBus sienaBus
reportingBus
public static SienaGaugeReportingBus reportingBus
SienaGaugeReportingBus
public SienaGaugeReportingBus()
- Creates new SienaReportingBus
reportConfigured
public boolean reportConfigured(GaugeID gauge,
StringPairVector configParams)
- Description copied from interface:
GaugeReportingBus
- Called when a gauge has been configured. This should always be
called when a guage is configured through its
GaugeControl
interface
to let other interested parties know.
- Specified by:
reportConfigured
in interface GaugeReportingBus
- Following copied from interface:
edu.cmu.cs.able.gaugeInfrastructure.GaugeReportingBus
- Parameters:
gauge
- The gauge being configured.configParams
- The new configuration of the gauge - as (name, value) pairs.- Returns:
- Whether the configuration was reported successfully.
reportCreated
public boolean reportCreated(GaugeID gauge)
- Description copied from interface:
GaugeReportingBus
- The first event produced by the gauge. It lets interested
parties know that a new gauge is about to report on the
bus.
- Specified by:
reportCreated
in interface GaugeReportingBus
- Following copied from interface:
edu.cmu.cs.able.gaugeInfrastructure.GaugeReportingBus
- Parameters:
gauge
- The ID of the new gauge.- Returns:
- Whether the report was successfully sent.
reportMultipleValues
public boolean reportMultipleValues(GaugeID gauge,
GaugeValueVector values)
- Description copied from interface:
GaugeReportingBus
- Called by a gauge when it reports multiple values. How often
the gauge reports these values is determined by the gauge
(although, it may be controlled through setup or configuration).
- Specified by:
reportMultipleValues
in interface GaugeReportingBus
- Following copied from interface:
edu.cmu.cs.able.gaugeInfrastructure.GaugeReportingBus
- Parameters:
gauge
- The gauge reporting the values.values
- The values being reported - as (valueName, propertyName, value) tuples.- Returns:
- true if the values where successfully reported; false otherwise.
reportValue
public boolean reportValue(GaugeID gauge,
java.lang.String valueName,
java.lang.String propertyName,
java.lang.String value)
- Description copied from interface:
GaugeReportingBus
- Called by a gauge when it reports a value. How often
the gauge reports these values is determined by the gauge
(although, it may be controlled through setup or configuration).
- Specified by:
reportValue
in interface GaugeReportingBus
- Following copied from interface:
edu.cmu.cs.able.gaugeInfrastructure.GaugeReportingBus
- Parameters:
gauge
- The gauge reporting the value.valueName
- The name of the value.propertyName
- The property with which the value is associated (established when the gauge is created)value
- The value being reported.- Returns:
- whether the value was reported successfully.
reportDeleted
public boolean reportDeleted(GaugeID gauge)
- Description copied from interface:
GaugeReportingBus
- This event is sent as the last act of the gauge before it is
destroyed. It lets all interested parties know that the gauge
will no longer report values.
- Specified by:
reportDeleted
in interface GaugeReportingBus
- Following copied from interface:
edu.cmu.cs.able.gaugeInfrastructure.GaugeReportingBus
- Parameters:
gauge
- The ID of the gauge being deleted.- Returns:
- Whether the deletion was reported successfully.
subscribeToGaugeEvent
public void subscribeToGaugeEvent(GaugeEvent event,
<>Subscriber subscriber)
unsubscribeToGaugeEvent
public void unsubscribeToGaugeEvent(GaugeEvent event,
<>Subscriber subscriber)
notify
public void notify(siena.Notification e)
- Specified by:
notify
in interface siena.Notifiable
notify
public void notify(siena.Notification[] e)
- Specified by:
notify
in interface siena.Notifiable
getReportingBus
public static GaugeReportingBus getReportingBus()
registerGauge
public void registerGauge(GaugeControl gauge,
StringPairVector setupParams,
StringPairVector mappings,
boolean waitForInit,
java.lang.String myManagerID)