| java.lang.Object java.util.EventObject org.snmp4j.event.CounterEvent
CounterEvent | public class CounterEvent extends EventObject (Code) | | 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
CounterEvent.setCurrentValue(Variable currentValue) method.
author: Frank Fock version: 1.0 |
Constructor Summary | |
public | CounterEvent(Object source, OID oid) Creates a CounterEvent for the specified counter. |
Method Summary | |
public Variable | getCurrentValue() Gets the current value of the counter, as set by the maintainer of the
counter (one of the event listeners). | public OID | getOid() Gets the instance object identifier of the counter. | public void | setCurrentValue(Variable currentValue) Sets the current value of the counter. |
CounterEvent | public CounterEvent(Object source, OID oid)(Code) | | Creates a CounterEvent for the specified counter.
Parameters: source - the source of the event. Parameters: oid - the OID of the counter instance (typically, the counter is a scalar andthus the OID has to end on zero). |
getCurrentValue | public Variable getCurrentValue()(Code) | | Gets the current value of the counter, as set by the maintainer of the
counter (one of the event listeners).
a Counter32 or Counter64 instance. |
getOid | public OID getOid()(Code) | | Gets the instance object identifier of the counter.
an OID . |
setCurrentValue | public void setCurrentValue(Variable currentValue)(Code) | | Sets the current value of the counter. This method has to be called by
the maintainer of the counter's value.
Parameters: currentValue - a Counter32 or Counter64 instance. |
|
|