Interface IndyConfigFactory


  • public interface IndyConfigFactory
    Describes a facility for loading all the configurations related to Indy, only one of which is IndyConfiguration.
    • Method Detail

      • getConfiguration

        <T> T getConfiguration​(Class<T> configCls)
                        throws org.commonjava.propulsor.config.ConfigurationException
        Return the configuration instance corresponding to the given class.
        Throws:
        org.commonjava.propulsor.config.ConfigurationException
      • load

        void load​(String config)
           throws org.commonjava.propulsor.config.ConfigurationException
        Read all configurations and apply them to the different configuration-class instances available.
        NOTE:If the main.conf doesn't exist, writeDefaultConfigs(File) will be called.
        Parameters:
        config - Most commonly, a path to a configuration file.
        Throws:
        org.commonjava.propulsor.config.ConfigurationException
      • writeDefaultConfigs

        void writeDefaultConfigs​(File dir)
                          throws org.commonjava.propulsor.config.ConfigurationException
        Query all configuration modules for their default configuration files and content, and write them to the specified configuration directory structure. The given directory is equivalent to ${indy.home}/etc/indy, and configuration modules are allowed to return relative paths that include a subdirectory (like conf.d/foo.conf).
        Parameters:
        dir - The directory into which default configurations should be written.
        Throws:
        org.commonjava.propulsor.config.ConfigurationException