Interface DynamicContext
-
- All Superinterfaces:
ExtensionPoint
- All Known Implementing Classes:
DynamicContext.Typed
public interface DynamicContext extends ExtensionPoint
AllowsStepContext.get(java.lang.Class<T>)
to provide a dynamically computed value.This is registered as an extension, so it may be injected into any build. If you would like to restrict action to a particular step block, use
BodyInvoker.withContext(java.lang.Object)
to insert some serializable struct that the dynamic context implementation will look for.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
DynamicContext.DelegatedContext
Restricted version ofStepContext
used only for delegation inget(Class, DelegatedContext)
.static class
DynamicContext.Typed<T>
A convenience subclass for the common case that you are returning only one kind of object.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
get(Class<T> key, DynamicContext.DelegatedContext context)
Actually look up a given object in a particular context.
-
-
-
Method Detail
-
get
@CheckForNull <T> T get(Class<T> key, DynamicContext.DelegatedContext context) throws IOException, InterruptedException
Actually look up a given object in a particular context.- Type Parameters:
T
- same asStepContext.get(java.lang.Class<T>)
- Parameters:
key
- same asStepContext.get(java.lang.Class<T>)
context
- the context being queried- Returns:
- same as
StepContext.get(java.lang.Class<T>)
- Throws:
IOException
- same asStepContext.get(java.lang.Class<T>)
InterruptedException
- same asStepContext.get(java.lang.Class<T>)
-
-