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> booleanareEquals(T obj1, T obj2)Checks if the two objects are equal or not.SnmpConfiggetConfig()getConfigvoidmergeIntoConfig(Definition eventDef)This is the exposed method for moving the data from a configureSNMP event into the SnmpConfig from SnmpPeerFactory.booleanremoveDefinition(Definition definition)Remove definition from the base config.
-
-
-
-
Constructor Detail
-
SnmpConfigManager
public SnmpConfigManager(SnmpConfig config)
Constructor for SnmpConfigManager.
- Parameters:
config- aSnmpConfigobject.
-
-
Method Detail
-
getConfig
public SnmpConfig getConfig()
getConfig
- Returns:
- a
SnmpConfigobject.
-
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- aDefinitionobject.
-
removeDefinition
public boolean removeDefinition(Definition definition)
Remove definition from the base config.- Parameters:
definition- a @Definitionobject- 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.
-
-