public final class ThreshdConfigFactory extends ThreshdConfigManager
m_config
Constructor and Description |
---|
ThreshdConfigFactory(InputStream stream)
Constructor for ThreshdConfigFactory.
|
Modifier and Type | Method and Description |
---|---|
static ThreshdConfigFactory |
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
|
void |
reloadXML()
reloadXML
|
protected void |
saveXML(String xmlString)
saveXML
|
static void |
setInstance(ThreshdConfigFactory configFactory)
setInstance
|
createPackageIpListMap, createUrlIpMap, getConfiguration, getPackage, interfaceInPackage, rebuildPackageIpListMap, saveCurrent, serviceInPackageAndEnabled
public ThreshdConfigFactory(InputStream stream) throws IOException
Constructor for ThreshdConfigFactory.
stream
- a InputStream
object.IOException
- if any.public static void init() throws IOException
IOException
- Thrown if the specified config file cannot be readIOException
- if any.public static void reload() throws IOException
IOException
- Thrown if the specified config file cannot be read/loadedIOException
- if any.public void reloadXML() throws IOException
reloadXML
reloadXML
in class ThreshdConfigManager
IOException
- if any.protected void saveXML(String xmlString) throws IOException
saveXML
saveXML
in class ThreshdConfigManager
xmlString
- a String
object.IOException
- if any.public static ThreshdConfigFactory getInstance()
IllegalStateException
- Thrown if the factory has not yet been initialized.public static void setInstance(ThreshdConfigFactory configFactory)
setInstance
configFactory
- a ThreshdConfigFactory
object.Copyright © 2019. All rights reserved.