Meters
The base class for meters is the class
Meter
.
The classes derived from
Meter
either measure at one point or
between two points and thus are called
OnePointMeter
and
TwoPointMeter
, respectively. It is the meters
responsibility to derive a metric from each message or from the flow of
messages, and provide the values of this metric to a statistic.
- The class
OnePointMeter
provides the method
attachInput()
which connects a
PortMonitor
to a port. Whenever a message travels
accross that port, the abstract method evaluateMessage()
in the
meter is called.
- The class
TwoPointMeter
provides the methods
attachFromPort()
and attachToPort()
each of which
connects a PortMonitor
to the specified port.
Whenever a message travels accross one of those ports, the abstract method
evaluateMessageFromPort()
or
evaluateMessageToPort()
, respectively, in the meter is called.