|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.loaders.ScanningPluginLoader
public class ScanningPluginLoader
Plugin loader that delegates the detection of plugins to a Scanner instance. The scanner may monitor the contents of a directory on disk, a database, or any other place plugins may be hidden.
| Field Summary | |
|---|---|
protected PluginArtifactFactory |
pluginArtifactFactory
|
protected List<PluginFactory> |
pluginFactories
|
protected Map<DeploymentUnit,Plugin> |
plugins
|
protected Scanner |
scanner
|
| Constructor Summary | |
|---|---|
ScanningPluginLoader(Scanner scanner,
List<PluginFactory> pluginFactories,
PluginArtifactFactory pluginArtifactFactory,
PluginEventManager pluginEventManager)
Construct a new scanning plugin loader with no default values |
|
ScanningPluginLoader(Scanner scanner,
List<PluginFactory> pluginFactories,
PluginEventManager pluginEventManager)
Constructor that provides a default plugin artifact factory |
|
| Method Summary | |
|---|---|
Collection<Plugin> |
addFoundPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
|
String |
canLoad(PluginArtifact pluginArtifact)
Determines if the artifact can be loaded by any of its deployers |
protected Plugin |
deployPluginFromUnit(DeploymentUnit deploymentUnit,
ModuleDescriptorFactory moduleDescriptorFactory)
|
Collection<Plugin> |
loadAllPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
|
void |
onShutdown(PluginFrameworkShutdownEvent event)
Called during plugin framework shutdown |
protected Plugin |
postProcess(Plugin plugin)
Template method that can be used by a specific PluginLoader to
add information to a Plugin after it has been loaded. |
void |
removePlugin(Plugin plugin)
Remove a specific plugin |
void |
shutDown()
Deprecated. Since 2.0.0, shutdown will automatically occur when the plugin framework is shutdown |
boolean |
supportsAddition()
|
boolean |
supportsRemoval()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Scanner scanner
protected final Map<DeploymentUnit,Plugin> plugins
protected final List<PluginFactory> pluginFactories
protected final PluginArtifactFactory pluginArtifactFactory
| Constructor Detail |
|---|
public ScanningPluginLoader(Scanner scanner,
List<PluginFactory> pluginFactories,
PluginEventManager pluginEventManager)
scanner - The scanner to use to detect new pluginspluginFactories - The deployers that will handle turning an artifact into a pluginpluginEventManager - The event manager, used for listening for shutdown events
public ScanningPluginLoader(Scanner scanner,
List<PluginFactory> pluginFactories,
PluginArtifactFactory pluginArtifactFactory,
PluginEventManager pluginEventManager)
scanner - The scanner to use to detect new pluginspluginFactories - The deployers that will handle turning an artifact into a pluginpluginArtifactFactory - used to create new plugin artifacts from an URLpluginEventManager - The event manager, used for listening for shutdown events| Method Detail |
|---|
public Collection<Plugin> loadAllPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
loadAllPlugins in interface PluginLoader
protected Plugin deployPluginFromUnit(DeploymentUnit deploymentUnit,
ModuleDescriptorFactory moduleDescriptorFactory)
public boolean supportsRemoval()
supportsRemoval in interface PluginLoaderpublic boolean supportsAddition()
supportsAddition in interface PluginLoader
public Collection<Plugin> addFoundPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
throws PluginParseException
addFoundPlugins in interface PluginLoaderPluginParseException
public void removePlugin(Plugin plugin)
throws PluginException
PluginLoader
removePlugin in interface PluginLoaderplugin - - the plugin to remove
PluginException - representing the reason for failure.public void onShutdown(PluginFrameworkShutdownEvent event)
event - The shutdown event@Deprecated public void shutDown()
public String canLoad(PluginArtifact pluginArtifact)
throws PluginParseException
canLoad in interface DynamicPluginLoaderpluginArtifact - The artifact to test
PluginParseExceptionprotected Plugin postProcess(Plugin plugin)
PluginLoader to
add information to a Plugin after it has been loaded.
plugin - a plugin that has been loaded
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||