Class RancidAdapterConfigFactory

    • Constructor Detail

      • RancidAdapterConfigFactory

        public RancidAdapterConfigFactory​(long currentVersion,
                                          InputStream reader)
                                   throws IOException
        constructor constructor
        Parameters:
        currentVersion - a long.
        reader - a InputStream object.
        Throws:
        IOException - Thrown if the specified config file cannot be read
        IOException - if any.
    • Method Detail

      • init

        public static void init()
                         throws IOException
        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
        IOException - if any.
      • reload

        public static void reload()
                           throws IOException
        Reload the config from the default config file
        Throws:
        IOException - Thrown if the specified config file cannot be read/loaded
        IOException - if any.
      • getInstance

        public static RancidAdapterConfigFactory getInstance()
        Return the singleton instance of this factory.
        Returns:
        The current factory instance.
        Throws:
        IllegalStateException - Thrown if the factory has not yet been initialized.