public final class ThreshdConfigFactory extends ThreshdConfigManager
m_config, m_localServer, m_verifyServer
Constructor and Description |
---|
ThreshdConfigFactory(InputStream stream,
String localServer,
boolean verifyServer)
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, String localServer, boolean verifyServer) throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
Constructor for ThreshdConfigFactory.
stream
- a InputStream
object.localServer
- a String
object.verifyServer
- a boolean.IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- 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.public void reloadXML() throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
reloadXML
reloadXML
in class ThreshdConfigManager
IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- 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 © 2017. All rights reserved.