Package com.pnfsoftware.jeb.core
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)
- self-contained JAR plugins
- development plugins consisting of classfile(s)
- python script plugins (jython 2.7 scripts)
Refer to IPlugin
.
-
Method Summary
Modifier and TypeMethodDescriptionGet the newest classloader used the plugin manager.Retrieve the engines context that instantiated this plugin manager.<T extends IPlugin>
List<IPluginFileEntry<T>>getPluginEntries
(Class<T> pluginClass) Retrieve external plugin entries by type.<T extends IPlugin>
List<IPluginFileEntry<T>>getPluginEntries
(Class<T> pluginClass, boolean rescan) Retrieve external plugin entries by type.getPlugins
(Class<T> pluginClass) Convenience method to retrieve external plugins by type.getPlugins
(Class<T> pluginClass, boolean rescan) Convenience method to retrieve external plugins by type.Load a JEB plugin(s) contained in the provided JAR file.Load a JEB plugin.
-
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
Load a JEB plugin(s) contained in the provided JAR file.- Parameters:
plugin
- a JAR file- Returns:
- the list of loaded plugin classes
-
load
Load a JEB plugin.- Parameters:
classpath
- optional classpath, separated by theFile.pathSeparatorChar
classname
- plugin classname- Returns:
- the loaded plugin class
-
getPlugins
Convenience method to retrieve external plugins by type. Shared plugin objects are retrieved. If fresh instances of plugin objects are necessary, usegetPluginEntries(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
Convenience method to retrieve external plugins by type. Shared plugin objects are retrieved. If fresh instances of plugin objects are necessary, usegetPluginEntries(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
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 typerescan
-- Returns:
- a list of plugin entries managed by this manager
-