Package hudson
Class ExtensionFinder.GuiceFinder
java.lang.Object
hudson.ExtensionFinder
hudson.ExtensionFinder.GuiceFinder
- All Implemented Interfaces:
ExtensionPoint
- Enclosing class:
- ExtensionFinder
Discovers components via sezpoz but instantiates them by using Guice.
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.ExtensionFinder
ExtensionFinder.DefaultGuiceExtensionAnnotation, ExtensionFinder.GuiceExtensionAnnotation<T extends Annotation>, ExtensionFinder.GuiceFinder, ExtensionFinder.SezpozNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.inject.ScopeScopethat allows a failure to create a component, and change the value to null. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<U> Collection<ExtensionComponent<U>>Discover extensions of the given type.com.google.inject.Injectorrefresh()The basic idea is: List up delta as a series of modulesvoidTODO: need to learn more about concurrent access toInjectorand how it interacts with classloading.Methods inherited from class hudson.ExtensionFinder
_find, findExtensions, isRefreshable
-
Field Details
-
FAULT_TOLERANT_SCOPE
public static final com.google.inject.Scope FAULT_TOLERANT_SCOPEScopethat allows a failure to create a component, and change the value to null.This is necessary as a failure to load one plugin shouldn't fail the startup of the entire Jenkins. Instead, we should just drop the failing plugins.
-
-
Constructor Details
-
GuiceFinder
public GuiceFinder()
-
-
Method Details
-
getContainer
public com.google.inject.Injector getContainer() -
refresh
The basic idea is:- List up delta as a series of modules
- Specified by:
refreshin classExtensionFinder- Returns:
- never null
- Throws:
ExtensionRefreshException- See Also:
-
find
Description copied from class:ExtensionFinderDiscover extensions of the given type.This method is called only once per the given type after all the plugins are loaded, so implementations need not worry about caching.
This method should return all the known components at the time of the call, including those that are discovered later via
ExtensionFinder.refresh(), even though those components are separately returned inExtensionComponentSet.- Specified by:
findin classExtensionFinder- Type Parameters:
U- The type of the extension points. This is not bound toExtensionPointbecause ofDescriptor, which by itself doesn't implementExtensionPointfor a historical reason.jenkins- Jenkins whose behalf this extension finder is performing lookup.- Returns:
- Can be empty but never null.
-
scout
TODO: need to learn more about concurrent access toInjectorand how it interacts with classloading.- Overrides:
scoutin classExtensionFinder
-