Class AutoReloadingConfiguration

java.lang.Object
org.fcrepo.kernel.api.utils.AutoReloadingConfiguration
Direct Known Subclasses:
RdfNamespaceRegistry

public abstract class AutoReloadingConfiguration extends Object
Abstract configuration class which monitors a file path in order to reload the configuration when it changes.
Author:
bbpennel
  • Field Details

  • Constructor Details

  • Method Details

    • init

      public void init() throws IOException
      Initialize the configuration and set up monitoring
      Throws:
      IOException - thrown if the configuration cannot be loaded.
    • shutdown

      public void shutdown()
      Shut down the change monitoring thread
    • loadConfiguration

      protected abstract void loadConfiguration() throws IOException
      Load the configuration file.
      Throws:
      IOException - thrown if the configuration cannot be loaded.
    • setConfigPath

      public void setConfigPath(String configPath)
      Set the file path for the configuration
      Parameters:
      configPath - file path for configuration
    • setMonitorForChanges

      public void setMonitorForChanges(boolean monitorForChanges)
      Set whether to monitor the configuration file for changes
      Parameters:
      monitorForChanges - flag controlling if to enable configuration monitoring