- java.lang.Object
-
- org.snmp4j.mp.CounterSupport
-
public class CounterSupport extends java.lang.Object
TheCounterSupport
class provides support to fireCounterEvent
to registered listeners.- Version:
- 3.0
- Author:
- Frank Fock
-
-
Field Summary
Fields Modifier and Type Field Description protected static CounterSupport
instance
-
Constructor Summary
Constructors Constructor Description CounterSupport()
Create a newCounterSupport
object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCounterListener(CounterListener listener)
Adds aCounterListener
.void
fireIncrementCounter(CounterEvent event)
Inform all registered listeners that the supplied counter needs to be incremented.static CounterSupport
getInstance()
Gets the counter support singleton.void
removeCounterListener(CounterListener listener)
Removes a previously addedCounterListener
.
-
-
-
Field Detail
-
instance
protected static CounterSupport instance
-
-
Method Detail
-
getInstance
public static CounterSupport getInstance()
Gets the counter support singleton.- Returns:
- the
CounterSupport
instance.
-
addCounterListener
public void addCounterListener(CounterListener listener)
Adds aCounterListener
.- Parameters:
listener
- aCounterListener
instance that needs to be informed when a counter needs to be incremented.
-
removeCounterListener
public void removeCounterListener(CounterListener listener)
Removes a previously addedCounterListener
.- Parameters:
listener
- aCounterListener
instance.
-
fireIncrementCounter
public void fireIncrementCounter(CounterEvent event)
Inform all registered listeners that the supplied counter needs to be incremented.- Parameters:
event
- aCounterEvent
containing information about the counter to be incremented.
-
-