Package org.jenkinsci.infra.tools
Class HyperLocalPluginManager
java.lang.Object
hudson.model.AbstractModelObject
hudson.PluginManager
hudson.LocalPluginManager
org.jenkinsci.infra.tools.HyperLocalPluginManager
- All Implemented Interfaces:
hudson.model.ModelObject,hudson.search.SearchableModelObject,hudson.search.SearchItem,jenkins.util.io.OnMaster,org.kohsuke.stapler.StaplerOverridable,org.kohsuke.stapler.StaplerProxy
public class HyperLocalPluginManager
extends hudson.LocalPluginManager
Acts as a PluginManager that operates outside the normal startup process of
Jenkins. Essentially, this captures the
loading ability of the PluginManager without actually starting those plugins.
This means it runs independently of Jenkins.
Since this PluginManager operates on such a local scale, many classes
associated with it are also changed to not use calls to Jenkins.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA PluginStrategy that supports custom classloaders (the UberPlusClassLoader).static final classThis is pretty much a copy of the final ExtensionFinder.Sezpoz class from 1.651 fitted for a custom ClassLoader rather than checking Jenkins The only differences are: * getIndices -> ClassLoader parameter; doesn't check Jenkins * find -> ClassLoader parameter * scout -> ClassLoader parameter IMPORTANT: don't use find(Class<T> type, Hudson hud) as the getIndices method will error.final classClassLoaderthat can see all plugins.Nested classes/interfaces inherited from class hudson.PluginManager
hudson.PluginManager.FailedPlugin, hudson.PluginManager.MetadataCache, hudson.PluginManager.PluginCycleDependenciesMonitor, hudson.PluginManager.PluginDeprecationMonitor, hudson.PluginManager.PluginUpdateMonitor, hudson.PluginManager.UberClassLoader, hudson.PluginManager.UpdateCenterProxy -
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class hudson.PluginManager
activePlugins, CONFIGURE_UPDATECENTER, context, CUSTOM_PLUGIN_MANAGER, failedPlugins, FAST_LOOKUP, plugins, pluginUploaded, rootDir, SKIP_PERMISSION_CHECK, uberClassLoader, UPLOAD_PLUGINS -
Constructor Summary
ConstructorsConstructorDescriptionHyperLocalPluginManager(boolean cycles) HyperLocalPluginManager(String rootDir, boolean cycles) -
Method Summary
Modifier and TypeMethodDescriptionorg.jvnet.hudson.reactor.TaskBuilderdiagramPlugins(hudson.init.InitStrategy initStrategy) Import plugins for use.getPluginNameForDescriptor(hudson.model.Descriptor<?> d) loadPluginsFromWar(String fromPath, FilenameFilter filter) Methods inherited from class hudson.LocalPluginManager
loadBundledPluginsMethods inherited from class hudson.PluginManager
addDependencies, copyBundledPlugin, createCache, createDefault, createPluginStrategy, disablePlugins, discover, doCheckPluginUrl, doCheckUpdateSiteUrl, doCheckUpdatesServer, doInstall, doInstallNecessaryPlugins, doInstallPlugins, doInstallPluginsDone, doPlugins, doPluginsSearch, doPrevalidateConfig, doProxyConfigure, doSiteConfigure, doUpdateSources, doUploadPlugin, doUploadPlugin, dynamicLoad, dynamicLoad, getApi, getBundledPluginManifest, getDetachedLocation, getDisplayName, getFailedPlugins, getLastErrorCheckUpdateCenters, getOverrides, getPlugin, getPlugin, getPlugins, getPlugins, getPluginsSortedByTitle, getProxyDescriptor, getSearchUrl, getTarget, getUpdates, getWorkDir, hasAdoptThisPluginLabel, hasAdoptThisPluginLabel, identifyPluginShortName, initTasks, install, isMetaLabel, isNonMetaLabel, isPluginUploaded, loadDetachedPlugins, parseRequestedPlugins, prevalidateConfig, resolveDependentPlugins, start, stop, unscientific, whichPluginMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.search.SearchItem
getSearchGroup, getSearchIcon
-
Field Details
-
uberPlusClassLoader
-
-
Constructor Details
-
HyperLocalPluginManager
public HyperLocalPluginManager(boolean cycles) -
HyperLocalPluginManager
-
-
Method Details
-
getPluginStrategy
- Overrides:
getPluginStrategyin classhudson.PluginManager
-
createModPluginStrategy
-
diagramPlugins
public org.jvnet.hudson.reactor.TaskBuilder diagramPlugins(hudson.init.InitStrategy initStrategy) Import plugins for use. Note: the plugin cycles section is optional because, while incredibly helpful, it can easily cross the open file descriptors threshold crippling any other work when processing a huge amount of plugins (several hundred). -
loadPluginsFromWar
- Overrides:
loadPluginsFromWarin classhudson.PluginManager
-
loadPluginsFromWar
@NonNull protected Set<String> loadPluginsFromWar(@NonNull String fromPath, @CheckForNull FilenameFilter filter) - Overrides:
loadPluginsFromWarin classhudson.PluginManager
-
getPluginNameForDescriptor
- Parameters:
d- descriptor- Returns:
- name of the plugin this class belongs to, or "core" if not found
-