Class ExtensionLoader

java.lang.Object
org.sentrysoftware.metricshub.engine.extension.ExtensionLoader

public class ExtensionLoader extends Object
Manages the loading of extensions from a specified directory and produces an ExtensionManager. This class is responsible for finding, loading, and initializing extensions that extend the functionality of MetricsHub. The extensions are expected to be jar files located in the specified extensions directory.
  • Constructor Details

    • ExtensionLoader

      public ExtensionLoader()
  • Method Details

    • load

      public ExtensionManager load() throws IOException
      Loads extensions from the extensionsDirectory and returns an ExtensionManager that wraps all the loaded extensions. Extensions are loaded as JAR files and are expected to implement certain extension interfaces to be recognized and used by the system.
      Returns:
      An ExtensionManager containing all loaded extensions.
      Throws:
      IOException - If an I/O error occurs reading from the directory or a JAR file.