public class CounterEvent
extends java.util.EventObject
CounterEvent
is an event object that indicates that a specific
counter needs to be incremented.
At the same time a CounterEvent
can be used by the event originator to retrieve the actual value of the
specified counter. Listeners that maintain the specified counter value,
must set the new value when receiving the CounterEvent
by using
the setCurrentValue(Variable currentValue)
method.
Modifier and Type | Field and Description |
---|---|
private Variable |
currentValue |
private OID |
oid |
private static long |
serialVersionUID |
Constructor and Description |
---|
CounterEvent(java.lang.Object source,
OID oid)
Creates a
CounterEvent for the specified counter. |
Modifier and Type | Method and Description |
---|---|
Variable |
getCurrentValue()
Gets the current value of the counter, as set by the maintainer of the
counter (one of the event listeners).
|
OID |
getOid()
Gets the instance object identifier of the counter.
|
void |
setCurrentValue(Variable currentValue)
Sets the current value of the counter.
|
private static final long serialVersionUID
private OID oid
private Variable currentValue
public CounterEvent(java.lang.Object source, OID oid)
CounterEvent
for the specified counter.source
- the source of the event.oid
- the OID of the counter instance (typically, the counter is a scalar and
thus the OID has to end on zero).