Package org.opennms.netmgt.config
Class EnhancedLinkdConfigFactory
- java.lang.Object
-
- org.opennms.netmgt.config.EnhancedLinkdConfigManager
-
- org.opennms.netmgt.config.EnhancedLinkdConfigFactory
-
- All Implemented Interfaces:
EnhancedLinkdConfig
public final class EnhancedLinkdConfigFactory extends EnhancedLinkdConfigManager
This is the singleton class used to load the configuration for the OpenNMS enhanced linkd service from the enlinkd-configuration xml file. Note: Users of this class should make sure the init() is called before calling any other method to ensure the config is loaded before accessing other convenience methods.- Author:
- Antonio Russo, OpenNMS
-
-
Field Summary
-
Fields inherited from class org.opennms.netmgt.config.EnhancedLinkdConfigManager
m_config
-
-
Constructor Summary
Constructors Constructor Description EnhancedLinkdConfigFactory()EnhancedLinkdConfigFactory(InputStream stream)Constructor for LinkdConfigFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreload()reloadprotected voidreloadXML(InputStream stream)reloadXMLvoidsave()Saves the current in-memory configuration to diskprotected voidsaveXml(String xml)saveXml-
Methods inherited from class org.opennms.netmgt.config.EnhancedLinkdConfigManager
disableBridgeVlanDiscovery, getBridgeTopologyInterval, getConfiguration, getDiscoveryBridgeThreads, getInitialSleepTime, getMaxBft, getReadLock, getRescanInterval, getThreads, getTopologyInterval, getWriteLock, useBridgeDiscovery, useCdpDiscovery, useIsisDiscovery, useLldpDiscovery, useOspfDiscovery
-
-
-
-
Constructor Detail
-
EnhancedLinkdConfigFactory
public EnhancedLinkdConfigFactory() throws IOException- Throws:
IOException
-
EnhancedLinkdConfigFactory
public EnhancedLinkdConfigFactory(InputStream stream) throws IOException
Constructor for LinkdConfigFactory.
- Parameters:
currentVersion- a long.stream- aInputStreamobject.- Throws:
IOException- if any.
-
-
Method Detail
-
saveXml
protected void saveXml(String xml) throws IOException
saveXml
- Specified by:
saveXmlin classEnhancedLinkdConfigManager- Parameters:
xml- aStringobject.- Throws:
IOException- if any.
-
reload
public void reload() throws IOExceptionreload
- Throws:
IOException- if any.
-
reloadXML
protected void reloadXML(InputStream stream) throws IOException
reloadXML
- Parameters:
stream- aInputStreamobject.- Throws:
IOException- if any.
-
save
public void save() throws IOExceptionSaves the current in-memory configuration to disk- Throws:
IOException- if any.
-
-