Interface DynamicContext
- All Superinterfaces:
ExtensionPoint
- All Known Implementing Classes:
DynamicContext.Typed
Allows
StepContext.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
Modifier and TypeInterfaceDescriptionstatic interface
Restricted version ofStepContext
used only for delegation inget(Class, DelegatedContext)
.static class
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
Modifier and TypeMethodDescription<T> T
get
(Class<T> key, DynamicContext.DelegatedContext context) Actually look up a given object in a particular context.
-
Method Details
-
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>)
-