@Deprecated
void
|
addPlugin(PluginLoader loader, Plugin plugin)
This method is deprecated.
Since 2.0.2, use #addPlugins(PluginLoader,Collection...) instead
|
void
|
addPlugins(PluginLoader loader, Collection<Plugin> pluginsToInstall)
Update the local plugin state and enable state aware modules.
|
void
|
disablePlugin(String key)
Disables the plugin with the given key.
|
void
|
disablePluginInternal(String key, boolean persistDisabledState)
|
void
|
disablePluginModule(String completeKey)
Disable a plugin module by key.
|
void
|
disablePluginModuleState(ModuleDescriptor<?> module, PluginPersistentStateStore stateStore)
|
void
|
disablePluginState(Plugin plugin, PluginPersistentStateStore stateStore)
|
void
|
disablePluginWithoutPersisting(String key)
Disables the plugin with the given key without persisting the disabled state.
|
@Deprecated
void
|
enablePlugin(String key)
This method is deprecated.
since 2.5.0, use {#link enablePlugins(String... keys)} instead
|
void
|
enablePluginModule(String completeKey)
Enable a plugin module by key.
|
void
|
enablePluginModuleState(ModuleDescriptor<?> module, PluginPersistentStateStore stateStore)
|
void
|
enablePluginState(Plugin plugin, PluginPersistentStateStore stateStore)
|
void
|
enablePlugins(String... keys)
Enable a set of plugins by key.
|
PluginsClassLoader
|
getClassLoader()
Retrieve the class loader responsible for loading classes and resources from plugins.
|
Class<?>
|
getDynamicPluginClass(String className)
Retrieve a class from a currently loaded (and active) dynamically loaded plugin.
|
InputStream
|
getDynamicResourceAsStream(String name)
Retrieve a resource from a currently loaded (and active) dynamically loaded plugin.
|
<D extends ModuleDescriptor<?>>
List<D>
|
getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz)
This method has been reverted to pre PLUG-40 to fix performance issues
that were encountered during load testing.
|
<D extends ModuleDescriptor<?>>
List<D>
|
getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz, boolean verbose)
Get all enabled module descriptors that have a specific descriptor class.
|
@Deprecated
<M>
List<ModuleDescriptor<M>>
|
getEnabledModuleDescriptorsByType(String type)
|
<M>
List<M>
|
getEnabledModulesByClass(Class<M> moduleClass)
Retrieve all plugin modules that implement or extend a specific class.
|
@Deprecated
<M>
List<M>
|
getEnabledModulesByClassAndDescriptor(Class<ModuleDescriptor<M>> descriptorClass, Class<M> moduleClass)
|
@Deprecated
<M>
List<M>
|
getEnabledModulesByClassAndDescriptor(Class[]<ModuleDescriptor<M>> descriptorClasses, Class<M> moduleClass)
|
Plugin
|
getEnabledPlugin(String pluginKey)
Retrieve a given plugin if it is enabled.
|
ModuleDescriptor<?>
|
getEnabledPluginModule(String completeKey)
Retrieve an enabled plugin module by complete module key.
|
Collection<Plugin>
|
getEnabledPlugins()
Get all of the currently enabled plugins.
|
<M>
Collection<ModuleDescriptor<M>>
|
getModuleDescriptors(ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
Gets all module descriptors of installed modules that match the given predicate.
|
<M>
Collection<M>
|
getModules(ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
Gets all installed modules that match the given predicate.
|
Plugin
|
getPlugin(String key)
Retrieve a given plugin (whether enabled or not).
|
ModuleDescriptor<?>
|
getPluginModule(String completeKey)
Retrieve any plugin module by complete module key.
|
InputStream
|
getPluginResourceAsStream(String pluginKey, String resourcePath)
Retrieve a resource from a currently loaded (and active) plugin.
|
PluginRestartState
|
getPluginRestartState(String key)
Gets the state of the plugin upon restart.
|
Collection<Plugin>
|
getPlugins(PluginPredicate pluginPredicate)
Gets all installed plugins that match the given predicate.
|
Collection<Plugin>
|
getPlugins()
Gets all of the currently installed plugins.
|
PluginPersistentState
|
getState()
|
final
PluginPersistentStateStore
|
getStore()
|
void
|
init()
Initialise the plugin system.
|
String
|
installPlugin(PluginArtifact pluginArtifact)
Installs a plugin and returns the plugin key
|
Set<String>
|
installPlugins(PluginArtifact... pluginArtifacts)
Installs multiple plugins and returns the list of plugin keys.
|
boolean
|
isPluginEnabled(String key)
This method checks to see if the plugin is enabled based on the state
manager and the plugin.
|
boolean
|
isPluginModuleEnabled(String completeKey)
Whether or not a given plugin module is currently enabled.
|
boolean
|
isSystemPlugin(String key)
|
void
|
notifyModuleDisabled(ModuleDescriptor<?> module)
|
void
|
notifyModuleEnabled(ModuleDescriptor<?> module)
|
void
|
notifyPluginDisabled(Plugin plugin)
|
void
|
notifyPluginEnabled(Plugin plugin)
Called on all clustered application nodes, rather than
enablePlugin(String) to just update the local state, state aware
modules and loaders, but not affect the global plugin state.
|
void
|
notifyUninstallPlugin(Plugin plugin)
|
void
|
onPluginContainerUnavailable(PluginContainerUnavailableEvent event)
|
void
|
onPluginModuleAvailable(PluginModuleAvailableEvent event)
|
void
|
onPluginModuleUnavailable(PluginModuleUnavailableEvent event)
|
void
|
onPluginRefresh(PluginRefreshedEvent event)
|
void
|
onUpdateRequiresRestartState(String pluginKey, PluginRestartState pluginRestartState)
|
void
|
removeStateFromStore(PluginPersistentStateStore stateStore, Plugin plugin)
|
void
|
revertRestartRequiredChange(String pluginKey)
Restores the state of any plugin requiring a restart that had been removed, upgraded, or installed.
|
int
|
scanForNewPlugins()
Search all loaders and add any new plugins you find.
|
@Deprecated
void
|
setDescriptorParserFactory(DescriptorParserFactory descriptorParserFactory)
This method is deprecated.
Since 2.0.0.beta2
|
void
|
setPluginInstaller(PluginInstaller pluginInstaller)
Set the plugin installation strategy for this manager
|
void
|
shutdown()
Fires the shutdown event
|
void
|
uninstall(Plugin plugin)
Uninstalls the given plugin, emitting disabled and uninstalled events as it does so.
|
void
|
uninstallNoEvent(Plugin plugin)
Preforms an uninstallation without broadcasting the uninstallation event.
|
void
|
unloadPlugin(Plugin plugin)
Unload a plugin.
|
void
|
updatePlugin(Plugin oldPlugin, Plugin newPlugin)
Replace an already loaded plugin with another version.
|
final
void
|
warmRestart()
Restart all plugins by disabling and enabling them in the order they were loaded (by plugin loader)
|