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 Classes
    Modifier and Type
    Class
    Description
    static class 
    A PluginStrategy that supports custom classloaders (the UberPlusClassLoader).
    static final class 
    This 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 class 
    ClassLoader that 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

    Fields
    Modifier and Type
    Field
    Description
     

    Fields 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

    Constructors
    Constructor
    Description
    HyperLocalPluginManager(boolean cycles)
     
    HyperLocalPluginManager(String rootDir, boolean cycles)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    org.jvnet.hudson.reactor.TaskBuilder
    diagramPlugins(hudson.init.InitStrategy initStrategy)
    Import plugins for use.
    getPluginNameForDescriptor(hudson.model.Descriptor<?> d)
     
     
    protected Set<String>
     
    protected Set<String>
     

    Methods inherited from class hudson.LocalPluginManager

    loadBundledPlugins

    Methods 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, whichPlugin

    Methods inherited from class hudson.model.AbstractModelObject

    getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendError

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface hudson.search.SearchItem

    getSearchGroup, getSearchIcon
  • Field Details

  • Constructor Details

    • HyperLocalPluginManager

      public HyperLocalPluginManager(boolean cycles)
    • HyperLocalPluginManager

      public HyperLocalPluginManager(String rootDir, boolean cycles)
  • Method Details

    • getPluginStrategy

      Overrides:
      getPluginStrategy in class hudson.PluginManager
    • createModPluginStrategy

      protected HyperLocalPluginManager.ModClassicPluginStrategy 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

      @NonNull protected Set<String> loadPluginsFromWar(@NonNull String p)
      Overrides:
      loadPluginsFromWar in class hudson.PluginManager
    • loadPluginsFromWar

      @NonNull protected Set<String> loadPluginsFromWar(@NonNull String fromPath, @CheckForNull FilenameFilter filter)
      Overrides:
      loadPluginsFromWar in class hudson.PluginManager
    • getPluginNameForDescriptor

      public String getPluginNameForDescriptor(hudson.model.Descriptor<?> d)
      Parameters:
      d - descriptor
      Returns:
      name of the plugin this class belongs to, or "core" if not found