public final class LinkdConfigFactory extends LinkdConfigManager
DEFAULT_IP_ROUTE_CLASS_NAME, m_config
Constructor and Description |
---|
LinkdConfigFactory(long currentVersion,
InputStream stream)
Constructor for LinkdConfigFactory.
|
Modifier and Type | Method and Description |
---|---|
static LinkdConfig |
getInstance()
Return the singleton instance of this factory.
|
static void |
init()
Load the config from the default config file and create the singleton
instance of this factory.
|
static void |
reload()
Reload the config from the default config file
|
protected void |
saveXml(String xml)
saveXml
|
static void |
setInstance(LinkdConfig instance)
setInstance
|
void |
update()
update
|
enableDiscoveryDownload, enumeratePackage, forceIpRouteDiscoveryOnEthernet, getAllPackageMatches, getConfiguration, getDefaultIpRouteClassName, getDiscoveryLinkInterval, getFirstPackageMatch, getInitialSleepTime, getIpList, getIpRouteClassName, getPackage, getReadLock, getSnmpPollInterval, getThreads, getVlanClassName, getWriteLock, hasClassName, hasIpRouteClassName, isAutoDiscoveryEnabled, isInterfaceInPackage, isInterfaceInPackageRange, isVlanDiscoveryEnabled, reloadXML, reloadXML, save, saveRouteTable, saveStpInterfaceTable, saveStpNodeTable, updatePackageIpListMap, useBridgeDiscovery, useCdpDiscovery, useIpRouteDiscovery
public LinkdConfigFactory(long currentVersion, InputStream stream) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException, IOException
Constructor for LinkdConfigFactory.
currentVersion
- a long.stream
- a InputStream
object.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.IOException
- if any.public static void init() throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
IOException
- Thrown if the specified config file cannot be readorg.exolab.castor.xml.MarshalException
- Thrown if the file does not conform to the schema.org.exolab.castor.xml.ValidationException
- Thrown if the contents do not match the required schema.IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.public static void reload() throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
IOException
- Thrown if the specified config file cannot be read/loadedorg.exolab.castor.xml.MarshalException
- Thrown if the file does not conform to the schema.org.exolab.castor.xml.ValidationException
- Thrown if the contents do not match the required schema.IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.protected void saveXml(String xml) throws IOException
saveXml
saveXml
in class LinkdConfigManager
xml
- a String
object.IOException
- if any.public static LinkdConfig getInstance()
IllegalStateException
- Thrown if the factory has not yet been initialized.public static void setInstance(LinkdConfig instance)
setInstance
instance
- a LinkdConfig
object.public void update() throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
update
update
in interface LinkdConfig
update
in class LinkdConfigManager
IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.Copyright © 2015. All Rights Reserved.