Class CpsBodyInvoker
- java.lang.Object
-
- org.jenkinsci.plugins.workflow.steps.BodyInvoker
-
- org.jenkinsci.plugins.workflow.cps.CpsBodyInvoker
-
public final class CpsBodyInvoker extends org.jenkinsci.plugins.workflow.steps.BodyInvoker
Builder pattern for accumulating configuration for executing the body.After various
withXyz
methods are invoked,start()
gets called to schedule the execution. The actual state update happens from thelaunch(CpsThread,FlowHead)
method, which isCpsVmThreadOnly
.- Author:
- Kohsuke Kawaguchi
- See Also:
CpsBodyExecution
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jenkinsci.plugins.workflow.cps.CpsBodyExecution
start()
Schedules the execution of the body.CpsBodyInvoker
withCallback(org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback callback)
CpsBodyInvoker
withContext(Object override)
org.jenkinsci.plugins.workflow.steps.BodyInvoker
withContexts(Collection<?> overrides)
CpsBodyInvoker
withDisplayName(String name)
CpsBodyInvoker
withStartAction(Action a)
-
-
-
Method Detail
-
withContext
public CpsBodyInvoker withContext(Object override)
- Specified by:
withContext
in classorg.jenkinsci.plugins.workflow.steps.BodyInvoker
-
withContexts
public org.jenkinsci.plugins.workflow.steps.BodyInvoker withContexts(Collection<?> overrides)
- Overrides:
withContexts
in classorg.jenkinsci.plugins.workflow.steps.BodyInvoker
-
withStartAction
public CpsBodyInvoker withStartAction(Action a)
-
withCallback
public CpsBodyInvoker withCallback(org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback callback)
- Specified by:
withCallback
in classorg.jenkinsci.plugins.workflow.steps.BodyInvoker
-
withDisplayName
public CpsBodyInvoker withDisplayName(@NonNull String name)
- Specified by:
withDisplayName
in classorg.jenkinsci.plugins.workflow.steps.BodyInvoker
-
start
public org.jenkinsci.plugins.workflow.cps.CpsBodyExecution start()
Schedules the execution of the body. The actual launching of the body will be done later inlaunch(org.jenkinsci.plugins.workflow.cps.CpsThread)
methods.- Specified by:
start
in classorg.jenkinsci.plugins.workflow.steps.BodyInvoker
-
-