com.atlassian.plugin.loaders
Class ClassLoadingPluginLoader
java.lang.Object
com.atlassian.plugin.loaders.ClassLoadingPluginLoader
- All Implemented Interfaces:
- PluginLoader
public class ClassLoadingPluginLoader
- extends java.lang.Object
- implements PluginLoader
A plugin loader to load plugins from a classloading on disk.
This creates a classloader for that classloading and loads plugins from all JARs from within it.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassLoadingPluginLoader
public ClassLoadingPluginLoader(java.io.File path,
PluginFactory pluginFactory)
ClassLoadingPluginLoader
public ClassLoadingPluginLoader(java.io.File path,
java.lang.String pluginDescriptorFileName,
PluginFactory pluginFactory)
loadAllPlugins
public java.util.Collection loadAllPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
- Specified by:
loadAllPlugins in interface PluginLoader
deployPluginFromUnit
protected Plugin deployPluginFromUnit(DeploymentUnit deploymentUnit,
ModuleDescriptorFactory moduleDescriptorFactory)
throws PluginParseException
- Returns:
- the plugin loaded from the deployment unit, or an UnloadablePlugin instance if loading fails.
- Throws:
PluginParseException
supportsRemoval
public boolean supportsRemoval()
- Specified by:
supportsRemoval in interface PluginLoader
- Returns:
- true if this PluginLoader tracks whether or not plugins are removed from it.
supportsAddition
public boolean supportsAddition()
- Specified by:
supportsAddition in interface PluginLoader
- Returns:
- true if this PluginLoader tracks whether or not plugins are added to it.
addFoundPlugins
public java.util.Collection addFoundPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
throws PluginParseException
- Specified by:
addFoundPlugins in interface PluginLoader
- Returns:
- all plugins, now loaded by the pluginLoader, which have been discovered and added since the
last time a check was performed.
- Throws:
PluginParseException
removePlugin
public void removePlugin(Plugin plugin)
throws PluginException
- Description copied from interface:
PluginLoader
- Remove a specific plugin
- Specified by:
removePlugin in interface PluginLoader
- Parameters:
plugin - - the plugin to remove
- Throws:
PluginException - representing the reason for failure.
shutDown
public void shutDown()
Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.