Package org.opennms.netmgt.config
Class ServiceConfigFactory
- java.lang.Object
- 
- org.opennms.netmgt.config.ServiceConfigFactory
 
- 
- All Implemented Interfaces:
- ServiceConfigFactory
 
 public final class ServiceConfigFactory extends Object implements ServiceConfigFactory This class is designed to be the main interface between the service configuration information and the users of the information. When initialized the factory loads the configuration from the file system, allowing access to the information by others. - Author:
- Weave
 
- 
- 
Constructor SummaryConstructors Constructor Description ServiceConfigFactory()Private constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Service[]getServices()Returns an array of all the defined configuration information for the Services.voidreload()Reload the config from the default config file
 
- 
- 
- 
Constructor Detail- 
ServiceConfigFactorypublic ServiceConfigFactory() Private constructor. This constructor used to load the specified configuration file and initialized an instance of the class.- Parameters:
- configFile- The name of the configuration file.
- Throws:
- IOException- Thrown if the specified config file cannot be read
 
 
- 
 - 
Method Detail- 
reloadpublic void reload() Reload the config from the default config file- Specified by:
- reloadin interface- ServiceConfigFactory
- Throws:
- IOException- Thrown if the specified config file cannot be read/loaded
- IOException- if any.
 
 - 
getServicespublic Service[] getServices() Returns an array of all the defined configuration information for the Services. If there are no defined services an array of length zero is returned to the caller.- Specified by:
- getServicesin interface- ServiceConfigFactory
- Returns:
- An array holding a reference to all the Service configuration instances.
 
 
- 
 
-