- java.lang.Object
-
- org.snmp4j.mp.CounterSupport
-
public class CounterSupport extends java.lang.ObjectTheCounterSupportclass provides support to fireCounterEventto registered listeners.- Version:
- 3.0
- Author:
- Frank Fock
-
-
Field Summary
Fields Modifier and Type Field Description protected static CounterSupportinstance
-
Constructor Summary
Constructors Constructor Description CounterSupport()Create a newCounterSupportobject.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCounterListener(CounterListener listener)Adds aCounterListener.voidfireIncrementCounter(CounterEvent event)Inform all registered listeners that the supplied counter needs to be incremented.static CounterSupportgetInstance()Gets the counter support singleton.voidremoveCounterListener(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
CounterSupportinstance.
-
addCounterListener
public void addCounterListener(CounterListener listener)
Adds aCounterListener.- Parameters:
listener- aCounterListenerinstance that needs to be informed when a counter needs to be incremented.
-
removeCounterListener
public void removeCounterListener(CounterListener listener)
Removes a previously addedCounterListener.- Parameters:
listener- aCounterListenerinstance.
-
fireIncrementCounter
public void fireIncrementCounter(CounterEvent event)
Inform all registered listeners that the supplied counter needs to be incremented.- Parameters:
event- aCounterEventcontaining information about the counter to be incremented.
-
-