Class StepExecutions
- java.lang.Object
-
- org.jenkinsci.plugins.workflow.steps.StepExecutions
-
public class StepExecutions extends Object
Builder for simpleStepExecution
implementations. Convenient for use fromStep.start(org.jenkinsci.plugins.workflow.steps.StepContext)
when a permanent serial form is unimportant. UseStepContext.get(java.lang.Class<T>)
to access contextual objects as usual.The lambda arguments may refer to
Step
parameter fields directly.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
StepExecutions.BlockBody
static interface
StepExecutions.SynchronousBody
static interface
StepExecutions.SynchronousBodyVoid
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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
synchronousNonBlockingVoid(StepContext context, StepExecutions.SynchronousBodyVoid body)
Creates aSynchronousNonBlockingStepExecution
running a given block.static StepExecution
synchronousVoid(StepContext context, StepExecutions.SynchronousBodyVoid body)
Creates aSynchronousStepExecution
running a given block.
-
-
-
Method Detail
-
synchronous
public static StepExecution synchronous(StepContext context, StepExecutions.SynchronousBody body)
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
public static StepExecution block(StepContext context, StepExecutions.BlockBody body)
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.
-
-