Interface IPluginManager


public interface IPluginManager
JEB plugin manager for external plugins running alongside the JEB back-end components. This manager handles:
- self-contained JAR plugins
- development plugins consisting of classfile(s)
- python script plugins (jython 2.7 scripts)

Refer to IPlugin.

  • Method Details

    • getEnginesContext

      IEnginesContext getEnginesContext()
      Retrieve the engines context that instantiated this plugin manager.
      Returns:
    • getClassloader

      ClassLoader getClassloader()
      Get the newest classloader used the plugin manager.
      Returns:
    • load

      List<Class<? extends IPlugin>> load(File plugin)
      Load a JEB plugin(s) contained in the provided JAR file.
      Parameters:
      plugin - a JAR file
      Returns:
      the list of loaded plugin classes
    • load

      Class<? extends IPlugin> load(String classpath, String classname)
      Load a JEB plugin.
      Parameters:
      classpath - optional classpath, separated by the File.pathSeparatorChar
      classname - plugin classname
      Returns:
      the loaded plugin class
    • getPlugins

      <T extends IPlugin> List<T> getPlugins(Class<T> pluginClass)
      Convenience method to retrieve external plugins by type. Shared plugin objects are retrieved. If fresh instances of plugin objects are necessary, use getPluginEntries(Class) instead.

      The list of non-script plugins (i.e., jar-like) is being retrieved statically.
      The list of script plugins (python, single Java files) is being regenerated with each call.

      Type Parameters:
      T -
      Parameters:
      pluginClass - plugin type (see limitations)
      Returns:
      a list of plugins managed by this manager
    • getPlugins

      <T extends IPlugin> List<T> getPlugins(Class<T> pluginClass, boolean rescan)
      Convenience method to retrieve external plugins by type. Shared plugin objects are retrieved. If fresh instances of plugin objects are necessary, use getPluginEntries(Class) instead.

      The list of non-script plugins (i.e., jar-like) is being retrieved statically.
      The list of script plugins (python, single Java files) is being regenerated with each call.

      Type Parameters:
      T -
      Parameters:
      pluginClass - plugin type (see limitations)
      rescan -
      Returns:
      a list of plugins managed by this manager
    • getPluginEntries

      <T extends IPlugin> List<IPluginFileEntry<T>> getPluginEntries(Class<T> pluginClass)
      Retrieve external plugin entries by type. Hot-reloadable plugins, such as Java scripts and Python scripts, will be reloaded if a new version is detected.

      The list of non-script plugins (i.e., jar-like) is being retrieved statically.
      The list of script plugins (python, single Java files) is being regenerated with each call.

      Type Parameters:
      T -
      Parameters:
      pluginClass - plugin type
      Returns:
      a list of plugin entries managed by this manager
    • getPluginEntries

      <T extends IPlugin> List<IPluginFileEntry<T>> getPluginEntries(Class<T> pluginClass, boolean rescan)
      Retrieve external plugin entries by type. Hot-reloadable plugins, such as Java scripts and Python scripts, will be reloaded if a new version is detected.

      The list of non-script plugins (i.e., jar-like) is being retrieved statically.
      The list of script plugins (python, single Java files) is being regenerated with each call.

      Type Parameters:
      T -
      Parameters:
      pluginClass - plugin type
      rescan -
      Returns:
      a list of plugin entries managed by this manager