Package org.opennms.netmgt.config
Class SnmpConfigManager
- java.lang.Object
-
- org.opennms.netmgt.config.SnmpConfigManager
-
public class SnmpConfigManager extends Object
This class handles merging a new Definition into the current running SNMP Configuration.- Author:
-
-
-
Constructor Summary
Constructors Constructor Description SnmpConfigManager(SnmpConfig config)
Constructor for SnmpConfigManager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static <T> boolean
areEquals(T obj1, T obj2)
Checks if the two objects are equal or not.SnmpConfig
getConfig()
getConfigvoid
mergeIntoConfig(Definition eventDef)
This is the exposed method for moving the data from a configureSNMP event into the SnmpConfig from SnmpPeerFactory.boolean
removeDefinition(Definition definition)
Remove definition from the base config.
-
-
-
-
Constructor Detail
-
SnmpConfigManager
public SnmpConfigManager(SnmpConfig config)
Constructor for SnmpConfigManager.
- Parameters:
config
- aSnmpConfig
object.
-
-
Method Detail
-
getConfig
public SnmpConfig getConfig()
getConfig
- Returns:
- a
SnmpConfig
object.
-
mergeIntoConfig
public void mergeIntoConfig(Definition eventDef)
This is the exposed method for moving the data from a configureSNMP event into the SnmpConfig from SnmpPeerFactory.- Parameters:
eventDef
- aDefinition
object.
-
removeDefinition
public boolean removeDefinition(Definition definition)
Remove definition from the base config.- Parameters:
definition
- a @Definition
object- Returns:
- true when definition is removed else false.
-
areEquals
protected static final <T> boolean areEquals(T obj1, T obj2)
Checks if the two objects are equal or not. They are equal if- obj1 and obj2 are null
- obj1 and obj2 are not null and obj1.equals(obj2)
- Parameters:
obj1
- Object 1obj2
- Object 2- Returns:
- true if obj1 and obj2 are equal, otherwise false.
-
-