org.snmp4j.mp
Class DefaultCounterListener
java.lang.Object
org.snmp4j.mp.DefaultCounterListener
- All Implemented Interfaces:
- java.util.EventListener, CounterListener
public class DefaultCounterListener
- extends java.lang.Object
- implements CounterListener
The DefaultCounterListener
is the default implementation of
the CounterListener
interface. For any counter incrementation
event it checks whether the referenced counter object already exists. If not,
it will be created and initialized with one. Otherwise, the current value
will be incremented by one. In either case, the current value will be
returned in the event object.
To use a DefaultCounterListener
with SNMP4J, add it to the
default CounterSupport
by:
CounterSupport.getInstance().addCounterListener(new DefaultCounterListener());
- Version:
- 1.0.1
- Author:
- Frank Fock
Method Summary |
void |
incrementCounter(CounterEvent event)
Increment the supplied counter instance and return the current value
(after incrementation) in the event object if the event receiver is the
maintainer of the counter value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCounterListener
public DefaultCounterListener()
- Default constructor.
incrementCounter
public void incrementCounter(CounterEvent event)
- Description copied from interface:
CounterListener
- Increment the supplied counter instance and return the current value
(after incrementation) in the event object if the event receiver is the
maintainer of the counter value.
- Specified by:
incrementCounter
in interface CounterListener
- Parameters:
event
- a CounterEvent
instance.
Copyright © 2011 SNMP4J.org. All Rights Reserved.