org.opennms.netmgt.config

Class ServiceConfigFactory

    • Method Detail

      • init

        public static void init()
                         throws IOException,
                                org.exolab.castor.xml.MarshalException,
                                org.exolab.castor.xml.ValidationException
        Load the config from the default config file and create the singleton instance of this factory.
        Throws:
        IOException - Thrown if the specified config file cannot be read
        org.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.
      • reload

        public static void reload()
                           throws IOException,
                                  org.exolab.castor.xml.MarshalException,
                                  org.exolab.castor.xml.ValidationException
        Reload the config from the default config file
        Throws:
        IOException - Thrown if the specified config file cannot be read/loaded
        org.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.
      • getInstance

        public static ServiceConfigFactory getInstance()
        Returns the currently defined singleton instance of the factory. There is only one instance of the configuration information, and it will not change unless the reload method is called.
        Returns:
        The singular instance of the factory class.
        Throws:
        IllegalStateException - Thrown if the factory has not yet been initialized.
      • getServices

        public 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.
        Returns:
        An array holding a reference to all the Service configuration instances.

Copyright © 2015. All Rights Reserved.