|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
org.snmp4j.event.CounterEvent
public class CounterEvent
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.
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
CounterEvent(java.lang.Object source,
OID oid)
Creates a CounterEvent for the specified counter. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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).Method Detail |
---|
public OID getOid()
OID
.public Variable getCurrentValue()
Counter32
or Counter64
instance.public void setCurrentValue(Variable currentValue)
currentValue
- a Counter32
or Counter64
instance.
|
Copyright 2005-2010 Frank Fock (SNMP4J.org) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |