Package org.opennms.netmgt.config
Class RancidAdapterConfigFactory
- java.lang.Object
-
- org.opennms.netmgt.config.RancidAdapterConfigManager
-
- org.opennms.netmgt.config.RancidAdapterConfigFactory
-
- All Implemented Interfaces:
RancidAdapterConfig
public class RancidAdapterConfigFactory extends RancidAdapterConfigManager
RancidAdapterConfigFactory class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Constructor Summary
Constructors Constructor Description RancidAdapterConfigFactory(long currentVersion, java.io.InputStream reader)constructor constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RancidAdapterConfigFactorygetInstance()Return the singleton instance of this factory.static voidinit()Load the config from the default config file and create the singleton instance of this factory.static voidreload()Reload the config from the default config fileprotected voidsaveXml(java.lang.String xml)saveXmlvoidupdate()update-
Methods inherited from class org.opennms.netmgt.config.RancidAdapterConfigManager
getConfiguration, getDelay, getReadLock, getRetries, getSchedules, getType, getWriteLock, hasSchedule, includeURLs, isCurTimeInSchedule, mappings, packages, policies, rebuildPackageIpListMap, reloadXML, useCategories
-
-
-
-
Constructor Detail
-
RancidAdapterConfigFactory
public RancidAdapterConfigFactory(long currentVersion, java.io.InputStream reader) throws java.io.IOExceptionconstructor constructor- Parameters:
currentVersion- a long.reader- aInputStreamobject.- Throws:
java.io.IOException- Thrown if the specified config file cannot be readjava.io.IOException- if any.
-
-
Method Detail
-
init
public static void init() throws java.io.IOExceptionLoad the config from the default config file and create the singleton instance of this factory.- Throws:
java.io.IOException- Thrown if the specified config file cannot be readjava.io.IOException- if any.
-
reload
public static void reload() throws java.io.IOExceptionReload the config from the default config file- Throws:
java.io.IOException- Thrown if the specified config file cannot be read/loadedjava.io.IOException- if any.
-
getInstance
public static RancidAdapterConfigFactory getInstance()
Return the singleton instance of this factory.- Returns:
- The current factory instance.
- Throws:
java.lang.IllegalStateException- Thrown if the factory has not yet been initialized.
-
saveXml
protected void saveXml(java.lang.String xml) throws java.io.IOExceptionsaveXml
- Parameters:
xml- aStringobject.- Throws:
java.io.IOException- if any.
-
update
public void update() throws java.io.IOExceptionupdate
- Throws:
java.io.IOException- if any.
-
-