Meter Class

Meter objects may be created in one of the following ways:

  • Top-level Meter objects (those whose Container object is null) are created using the lookupMeter constructor of the Listener object.
  • Subordinate Meter objects of a Container or an Event are created using the lookupMeter constructor method of the respective object. Note that the namespace for Meters is separate from that of Events.

When a Meter object is first created, its counter value is set to zero. The value can later be increased by calling the incrementValue method or changed using setValue.

For more information about creating and using Meters, see the topics in the section Reporting Performance Data with Meters.

Constructor

lookupMeter
Creates a Meter object at the top-level of the Listener, or as a subordinate to a Container or Event.

Methods

getValue
Returns the current value of the Meter object's counter.
incrementValue
Increments the value of the Meter object's counter.
setValue
Sets the Meter object's counter to the specified value.

See Also