Package hudson
Class ClassicPluginStrategy
java.lang.Object
hudson.ClassicPluginStrategy
- All Implemented Interfaces:
ExtensionPoint,PluginStrategy
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ClassLoadercreateClassLoader(String name, List<File> paths, ClassLoader parent, Attributes atts) Creates a classloader that can load all the specified jar files and delegate to the given parent.protected ClassLoadercreateClassLoader(List<File> paths, ClassLoader parent) Deprecated.protected ClassLoadercreateClassLoader(List<File> paths, ClassLoader parent, Attributes atts) Deprecated.since 2.459 usecreateClassLoader(String, List, ClassLoader, Attributes)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.static List<PluginWrapper.Dependency>getImpliedDependencies(String pluginName, String jenkinsVersion) Deprecated.since 2.163getShortName(File archive) Finds the plugin name without actually unpacking anythingPluginStrategy.createPluginWrapper(java.io.File)would.voidinitializeComponents(PluginWrapper plugin) Optionally start services provided by the plugin.voidload(PluginWrapper wrapper) Loads the plugin and starts it.voidstartPlugin(PluginWrapper plugin) voidupdateDependency(PluginWrapper depender, PluginWrapper dependee) Called when a plugin is installed, but there was already a plugin installed which optionally depended on that plugin.
-
Constructor Details
-
ClassicPluginStrategy
-
-
Method Details
-
getShortName
Description copied from interface:PluginStrategyFinds the plugin name without actually unpacking anythingPluginStrategy.createPluginWrapper(java.io.File)would. Needed byPluginManager.dynamicLoad(java.io.File)to decide whether such a plugin is already installed.- Specified by:
getShortNamein interfacePluginStrategy- Returns:
- the
PluginWrapper.getShortName() - Throws:
IOException
-
createPluginWrapper
Description copied from interface:PluginStrategyCreates a plugin wrapper, which provides a management interface for the plugin- Specified by:
createPluginWrapperin interfacePluginStrategy- Parameters:
archive- Either a directory that points to a pre-exploded plugin, or an jpi file, or an jpl file.- Throws:
IOException
-
getImpliedDependencies
@Deprecated @NonNull public static List<PluginWrapper.Dependency> getImpliedDependencies(String pluginName, String jenkinsVersion) Deprecated.since 2.163 -
createClassLoader
@Deprecated(since="2.459") protected ClassLoader createClassLoader(List<File> paths, ClassLoader parent) throws IOException Deprecated.since 2.459 usecreateClassLoader(String, List, ClassLoader, Attributes)- Throws:
IOException
-
createClassLoader
@Deprecated(since="2.459") protected ClassLoader createClassLoader(List<File> paths, ClassLoader parent, Attributes atts) throws IOException Deprecated.since 2.459 usecreateClassLoader(String, List, ClassLoader, Attributes)- Throws:
IOException
-
createClassLoader
protected ClassLoader createClassLoader(String name, List<File> paths, ClassLoader parent, Attributes atts) throws IOException Creates a classloader that can load all the specified jar files and delegate to the given parent.- Throws:
IOException- Since:
- 2.459
-
initializeComponents
Description copied from interface:PluginStrategyOptionally start services provided by the plugin. Should be called when all plugins are loaded.- Specified by:
initializeComponentsin interfacePluginStrategy
-
findComponents
Description copied from interface:PluginStrategyFind components of the given type using the assigned strategy.- Specified by:
findComponentsin interfacePluginStrategy- Parameters:
type- The component typehudson- The Hudson scope- Returns:
- Sequence of components
-
load
Description copied from interface:PluginStrategyLoads 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:
loadin interfacePluginStrategy- Throws:
IOException
-
startPlugin
- Throws:
Exception
-
updateDependency
Description copied from interface:PluginStrategyCalled when a plugin is installed, but there was already a plugin installed which optionally depended on that plugin. The class loader of the existing depending plugin should be updated to load classes from the newly installed plugin.- Specified by:
updateDependencyin interfacePluginStrategy- Parameters:
depender- plugin depending on dependee.dependee- newly loaded plugin.
-
createClassLoader(String, List, ClassLoader, Attributes)