extracted a PluginStrategy from PluginManager and PluginWrapper

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@12443 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
huybrechts committed 2008-10-01 19:49:37 +00:00
1 parent 33eac8d684
commit 39a667df80
4 files changed
+468 -309

No files matched your search

@@ -0,0 +1,34 @@
package hudson;
import java.io.File;
import java.io.IOException;
public interface PluginStrategy {
/**
* Creates a plugin wrapper, which provides a management interface for the plugin
* @param archive
* @return
* @throws IOException
*/
public abstract PluginWrapper createPluginWrapper(File archive)
throws IOException;
/**
* Loads the plugin and starts it.
*
* <p>
* This should be done after all the classloaders are constructed for all
* the plugins, so that dependencies can be properly loaded by plugins.
*/
public abstract void load(PluginWrapper wrapper) throws IOException;
/**
* Optionally start services provided by the plugin. Should be called
* when all plugins are loaded.
*
* @param plugin
*/
public abstract void initializeComponents(PluginWrapper plugin);
}