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 void
reload()
reloadprotected void
reloadXML(InputStream stream)
reloadXMLvoid
save()
Saves the current in-memory configuration to diskprotected void
saveXml(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
- aInputStream
object.- Throws:
IOException
- if any.
-
-
Method Detail
-
saveXml
protected void saveXml(String xml) throws IOException
saveXml
- Specified by:
saveXml
in classEnhancedLinkdConfigManager
- Parameters:
xml
- aString
object.- Throws:
IOException
- if any.
-
reload
public void reload() throws IOException
reload
- Throws:
IOException
- if any.
-
reloadXML
protected void reloadXML(InputStream stream) throws IOException
reloadXML
- Parameters:
stream
- aInputStream
object.- Throws:
IOException
- if any.
-
save
public void save() throws IOException
Saves the current in-memory configuration to disk- Throws:
IOException
- if any.
-
-