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.
|
void |
reload()
reload
|
protected void |
reloadXML(InputStream stream)
reloadXML
|
protected void |
reloadXML(Reader reader)
Deprecated.
|
void |
save()
Saves the current in-memory configuration to disk
|
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, saveRouteTable, saveStpInterfaceTable, saveStpNodeTable, updateIpRouteClassNames, updatePackageIpListMap, updateUrlIpMap, updateVlanClassNames, useBridgeDiscovery, useCdpDiscovery, useIpRouteDiscovery, useLldpDiscovery, useOspfDiscovery
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.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 reload() throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
reload
IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.public void update()
update
update
in interface LinkdConfig
update
in class LinkdConfigManager
protected void reloadXML(InputStream stream) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException, IOException
reloadXML
stream
- a InputStream
object.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.IOException
- if any.public void save() throws org.exolab.castor.xml.MarshalException, IOException, org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.MarshalException
- if any.IOException
- if any.org.exolab.castor.xml.ValidationException
- if any.@Deprecated protected void reloadXML(Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException, IOException
reloadXML
reader
- a Reader
object.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.IOException
- if any.Copyright © 2015. All Rights Reserved.