|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.sensor.gauge.GaugeRuntime
Main entry point for working with gauges
, which are
simple sensors that measure the value of a single numeric property.
Constructor Summary | |
GaugeRuntime()
|
Method Summary | |
void |
addGauge(Gauge gauge)
Register a new Gauge with the runtime using its own label as the key. |
Gauge |
getGauge(String label)
Retrieves the Gauge matching the specified label. |
List |
getGauges()
Returns a List<Gauge> of all registered gauges. |
Gauge |
removeGauge(String label)
Removes the Gauge matching the specified label. |
void |
setGauges(List gauges)
Registers all gauges in the specified List<Gauge> with the runtime using their own labels as keys. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GaugeRuntime()
Method Detail |
public void addGauge(Gauge gauge)
gauge
- an instance of Gauge
. Nulls are silently ignored.public void setGauges(List gauges)
gauges
- a List<Gauge>. Nulls are silently ignored.public Gauge getGauge(String label)
Gauge
matching the specified label.
label
- a label String that should map to an instance of Gauge
Gauge
mapped to the specified label or null
if no instance could be found.public Gauge removeGauge(String label)
Gauge
matching the specified label.
label
- a label String that should map to an instance of Gauge
Gauge
that was mapped to the specified
label or null if no instance could be found.public List getGauges()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |