Class StepExecutions
java.lang.Object
org.jenkinsci.plugins.workflow.steps.StepExecutions
Builder for simple
StepExecution
implementations.
Convenient for use from Step.start(org.jenkinsci.plugins.workflow.steps.StepContext)
when a permanent serial form is unimportant.
Use StepContext.get(java.lang.Class<T>)
to access contextual objects as usual.
The lambda arguments may refer to Step
parameter fields directly.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionstatic StepExecution
block
(StepContext context, StepExecutions.BlockBody body) Creates a block-scoped execution allowing various initial actions includingBodyInvoker.withContext(java.lang.Object)
.static StepExecution
synchronous
(StepContext context, StepExecutions.SynchronousBody body) Creates aSynchronousStepExecution
running a given block with a return value.static StepExecution
synchronousNonBlocking
(StepContext context, StepExecutions.SynchronousBody body) Creates aSynchronousNonBlockingStepExecution
running a given block with a return value.static StepExecution
Creates aSynchronousNonBlockingStepExecution
running a given block.static StepExecution
synchronousVoid
(StepContext context, StepExecutions.SynchronousBodyVoid body) Creates aSynchronousStepExecution
running a given block.
-
Method Details
-
synchronous
Creates aSynchronousStepExecution
running a given block with a return value. -
synchronousVoid
public static StepExecution synchronousVoid(StepContext context, StepExecutions.SynchronousBodyVoid body) Creates aSynchronousStepExecution
running a given block. -
synchronousNonBlocking
public static StepExecution synchronousNonBlocking(StepContext context, StepExecutions.SynchronousBody body) Creates aSynchronousNonBlockingStepExecution
running a given block with a return value. -
synchronousNonBlockingVoid
public static StepExecution synchronousNonBlockingVoid(StepContext context, StepExecutions.SynchronousBodyVoid body) Creates aSynchronousNonBlockingStepExecution
running a given block. -
block
Creates a block-scoped execution allowing various initial actions includingBodyInvoker.withContext(java.lang.Object)
. There is no pluggable final action, sinceBodyExecutionCallback.wrap(com.google.common.util.concurrent.FutureCallback<java.lang.Object>)
is used, so it is a simple tail call.
-