Class BodyExecution
java.lang.Object
org.jenkinsci.plugins.workflow.steps.BodyExecution
- All Implemented Interfaces:
Serializable,Future<Object>
Represents the executing body block of
Step.
As a representation of asynchronous computation, this object implements Future,
so that you can cancel the execution, install a listener, etc.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel(boolean b) Deprecated.booleanAttempts to cancel an executing body block.booleancancel(CauseOfInterruption... causes) Deprecated.abstract Collection<StepExecution>Returns the inner-mostStepExecutions that are currently executing.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.Future
get, get, isCancelled, isDone
-
Constructor Details
-
BodyExecution
public BodyExecution()
-
-
Method Details
-
getCurrentExecutions
Returns the inner-mostStepExecutions that are currently executing. -
cancel
Deprecated. -
cancel
Deprecated.usecancel(Throwable)to provide richer context -
cancel
Attempts to cancel an executing body block.If the body has finished executing, or is cancelled already, the attempt will fail. This method is asynchronous. There's no guarantee that the cancellation has happened or completed before this method returns.
- Parameters:
t- reason for cancellation; typically aFlowInterruptedException- Returns:
- false if the task cannot be cancelled.
-
cancel(Throwable)to provide richer context