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 Pinger
getInstance()
Returns an implementation of the defaultPinger
classPinger
getInstance(int tc, boolean allowFragmentation)
Returns an implementation of thePinger
class associated with the socket configured for the given traffic control and fragmentation bits.abstract Class<? extends Pinger>
getPingerClass()
void
reset()
void
setInstance(int tc, boolean allowFragmentation, Pinger pinger)
-
-
-
Method Detail
-
getInstance
public Pinger getInstance()
Description copied from interface:PingerFactory
Returns an implementation of the defaultPinger
class- Specified by:
getInstance
in interfacePingerFactory
- Returns:
- a
Pinger
object.
-
getInstance
public Pinger getInstance(int tc, boolean allowFragmentation)
Description copied from interface:PingerFactory
Returns an implementation of thePinger
class associated with the socket configured for the given traffic control and fragmentation bits.- Specified by:
getInstance
in interfacePingerFactory
- Parameters:
tc
- the traffic control value to set, use "0" for noneallowFragmentation
- whether to allow fragmentation- Returns:
- a
Pinger
object.
-
setInstance
public void setInstance(int tc, boolean allowFragmentation, Pinger pinger)
-
reset
public void reset()
-
-