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(java.io.InputStream stream)
Constructor for LinkdConfigFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
reload()
reloadprotected void
reloadXML(java.io.InputStream stream)
reloadXMLvoid
save()
Saves the current in-memory configuration to diskprotected void
saveXml(java.lang.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 java.io.IOException
- Throws:
java.io.IOException
-
EnhancedLinkdConfigFactory
public EnhancedLinkdConfigFactory(java.io.InputStream stream) throws java.io.IOException
Constructor for LinkdConfigFactory.
- Parameters:
currentVersion
- a long.stream
- aInputStream
object.- Throws:
java.io.IOException
- if any.
-
-
Method Detail
-
saveXml
protected void saveXml(java.lang.String xml) throws java.io.IOException
saveXml
- Specified by:
saveXml
in classEnhancedLinkdConfigManager
- Parameters:
xml
- aString
object.- Throws:
java.io.IOException
- if any.
-
reload
public void reload() throws java.io.IOException
reload
- Throws:
java.io.IOException
- if any.
-
reloadXML
protected void reloadXML(java.io.InputStream stream) throws java.io.IOException
reloadXML
- Parameters:
stream
- aInputStream
object.- Throws:
java.io.IOException
- if any.
-
save
public void save() throws java.io.IOException
Saves the current in-memory configuration to disk- Throws:
java.io.IOException
- if any.
-
-