hudson
Class ClassicPluginStrategy

java.lang.Object
  extended by hudson.ClassicPluginStrategy
All Implemented Interfaces:
ExtensionPoint, PluginStrategy

public class ClassicPluginStrategy
extends Object
implements PluginStrategy


Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static boolean useAntClassLoader
           
 
Constructor Summary
ClassicPluginStrategy(PluginManager pluginManager)
           
 
Method Summary
protected  ClassLoader createClassLoader(List<File> paths, ClassLoader parent)
          Deprecated. 
protected  ClassLoader createClassLoader(List<File> paths, ClassLoader parent, Attributes atts)
          Creates the classloader that can load all the specified jar files and delegate to the given parent.
 PluginWrapper createPluginWrapper(File archive)
          Creates a plugin wrapper, which provides a management interface for the plugin
<T> List<ExtensionComponent<T>>
findComponents(Class<T> type, Hudson hudson)
          Find components of the given type using the assigned strategy.
 void initializeComponents(PluginWrapper plugin)
          Optionally start services provided by the plugin.
 void load(PluginWrapper wrapper)
          Loads the plugin and starts it.
 void startPlugin(PluginWrapper plugin)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

useAntClassLoader

public static boolean useAntClassLoader
Constructor Detail

ClassicPluginStrategy

public ClassicPluginStrategy(PluginManager pluginManager)
Method Detail

createPluginWrapper

public PluginWrapper createPluginWrapper(File archive)
                                  throws IOException
Description copied from interface: PluginStrategy
Creates a plugin wrapper, which provides a management interface for the plugin

Specified by:
createPluginWrapper in interface PluginStrategy
Parameters:
archive - Either a directory that points to a pre-exploded plugin, or an jpi file, or an jpl file.
Throws:
IOException

createClassLoader

@Deprecated
protected ClassLoader createClassLoader(List<File> paths,
                                                   ClassLoader parent)
                                 throws IOException
Deprecated. 

Throws:
IOException

createClassLoader

protected ClassLoader createClassLoader(List<File> paths,
                                        ClassLoader parent,
                                        Attributes atts)
                                 throws IOException
Creates the classloader that can load all the specified jar files and delegate to the given parent.

Throws:
IOException

initializeComponents

public void initializeComponents(PluginWrapper plugin)
Description copied from interface: PluginStrategy
Optionally start services provided by the plugin. Should be called when all plugins are loaded.

Specified by:
initializeComponents in interface PluginStrategy

findComponents

public <T> List<ExtensionComponent<T>> findComponents(Class<T> type,
                                                      Hudson hudson)
Description copied from interface: PluginStrategy
Find components of the given type using the assigned strategy.

Specified by:
findComponents in interface PluginStrategy
Parameters:
type - The component type
hudson - The Hudson scope
Returns:
Sequence of components

load

public void load(PluginWrapper wrapper)
          throws IOException
Description copied from interface: PluginStrategy
Loads the plugin and starts it.

This should be done after all the classloaders are constructed for all the plugins, so that dependencies can be properly loaded by plugins.

Specified by:
load in interface PluginStrategy
Throws:
IOException

startPlugin

public void startPlugin(PluginWrapper plugin)
                 throws Exception
Throws:
Exception


Copyright © 2004-2013. All Rights Reserved.