Package org.opennms.netmgt.icmp
Class AbstractPingerFactory
- java.lang.Object
-
- org.opennms.netmgt.icmp.AbstractPingerFactory
-
- All Implemented Interfaces:
PingerFactory
- Direct Known Subclasses:
BestMatchPingerFactory,JnaPingerFactory,Jni6PingerFactory,JniPingerFactory,PingerFactoryImpl
public abstract class AbstractPingerFactory extends Object implements PingerFactory
PingerFactory class.
- Author:
- Benjamin Reed, Seth Leger, Matt Brozowski
-
-
Field Summary
Fields Modifier and Type Field Description protected static com.google.common.cache.Cache<Integer,Pinger>m_pingers-
Fields inherited from interface org.opennms.netmgt.icmp.PingerFactory
FRAG_FALSE, FRAG_TRUE, MAX_DSCP
-
-
Constructor Summary
Constructors Constructor Description AbstractPingerFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PingergetInstance()Returns an implementation of the defaultPingerclassPingergetInstance(int tc, boolean allowFragmentation)Returns an implementation of thePingerclass associated with the socket configured for the given traffic control and fragmentation bits.abstract Class<? extends Pinger>getPingerClass()voidreset()voidsetInstance(int tc, boolean allowFragmentation, Pinger pinger)
-
-
-
Method Detail
-
getInstance
public Pinger getInstance()
Description copied from interface:PingerFactoryReturns an implementation of the defaultPingerclass- Specified by:
getInstancein interfacePingerFactory- Returns:
- a
Pingerobject.
-
getInstance
public Pinger getInstance(int tc, boolean allowFragmentation)
Description copied from interface:PingerFactoryReturns an implementation of thePingerclass associated with the socket configured for the given traffic control and fragmentation bits.- Specified by:
getInstancein interfacePingerFactory- Parameters:
tc- the traffic control value to set, use "0" for noneallowFragmentation- whether to allow fragmentation- Returns:
- a
Pingerobject.
-
setInstance
public void setInstance(int tc, boolean allowFragmentation, Pinger pinger)
-
reset
public void reset()
-
-