public abstract class BodyInvoker extends Object
Step
.StepContext.newBodyInvoker()
Constructor and Description |
---|
BodyInvoker() |
Modifier and Type | Method and Description |
---|---|
static hudson.console.ConsoleLogFilter |
mergeConsoleLogFilters(hudson.console.ConsoleLogFilter original,
hudson.console.ConsoleLogFilter subsequent)
Merge two console log filters so that both are applied.
|
static hudson.LauncherDecorator |
mergeLauncherDecorators(hudson.LauncherDecorator original,
hudson.LauncherDecorator subsequent)
Merge two launcher decorators so that both are applied.
|
abstract BodyExecution |
start()
Schedules an asynchronous invocation of the body that's given as an argument
to the step invocation (in a host language dependent manner), with settings
configured on this object via other methods.
|
abstract BodyInvoker |
withCallback(BodyExecutionCallback callback)
Registers a callback that tracks the progress of the body execution.
|
BodyInvoker |
withCallback(com.google.common.util.concurrent.FutureCallback<Object> callback)
Deprecated.
Use
withCallback(BodyExecutionCallback) and call BodyExecutionCallback.wrap(com.google.common.util.concurrent.FutureCallback<java.lang.Object>) if this is what you really wanted. |
abstract BodyInvoker |
withContext(Object override)
Overrides to the context values that are in effect while evaluating the body.
|
BodyInvoker |
withContexts(Collection<?> overrides) |
BodyInvoker |
withContexts(Object... overrides) |
abstract BodyInvoker |
withDisplayName(String name)
Sets a human readable name that describes this body invocation.
|
public abstract BodyInvoker withContext(Object override)
Note that for only one instance of a given class can be in context at a time. Thus for certain types, an invoker will generally need to look up any instance in its own enclosing context amd create a proxy/merge:
EnvVars
EnvironmentExpander
instead
EnvironmentExpander
EnvironmentExpander.merge(org.jenkinsci.plugins.workflow.steps.EnvironmentExpander, org.jenkinsci.plugins.workflow.steps.EnvironmentExpander)
ConsoleLogFilter
mergeConsoleLogFilters(hudson.console.ConsoleLogFilter, hudson.console.ConsoleLogFilter)
LauncherDecorator
mergeLauncherDecorators(hudson.LauncherDecorator, hudson.LauncherDecorator)
StepContext.get(Class)
public BodyInvoker withContexts(Object... overrides)
public BodyInvoker withContexts(Collection<?> overrides)
public abstract BodyInvoker withDisplayName(@Nonnull String name)
public abstract BodyInvoker withCallback(BodyExecutionCallback callback)
public final BodyInvoker withCallback(com.google.common.util.concurrent.FutureCallback<Object> callback)
withCallback(BodyExecutionCallback)
and call BodyExecutionCallback.wrap(com.google.common.util.concurrent.FutureCallback<java.lang.Object>)
if this is what you really wanted.public abstract BodyExecution start()
public static hudson.console.ConsoleLogFilter mergeConsoleLogFilters(@CheckForNull hudson.console.ConsoleLogFilter original, @Nonnull hudson.console.ConsoleLogFilter subsequent)
original
- the original filter in StepContext.get(java.lang.Class<T>)
, if anysubsequent
- your implementation; should expect null
for the build
parameter, and be Serializable
withContext(java.lang.Object)
public static hudson.LauncherDecorator mergeLauncherDecorators(@CheckForNull hudson.LauncherDecorator original, @Nonnull hudson.LauncherDecorator subsequent)
original
- the original decorator in StepContext.get(java.lang.Class<T>)
, if anysubsequent
- your implementation; should be Serializable
withContext(java.lang.Object)
Copyright © 2016–2017. All rights reserved.