- All Implemented Interfaces:
- Enclosing class:
public abstract static class BodyExecutionCallback.TailCall extends BodyExecutionCallbackA convenience subclass for the common case that the step expects to run its block just once and return the same value (or throw the same error).
Constructors Constructor Description
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description
protected abstract void
finished(StepContext context)Called when the body is finished.
onFailure(StepContext context, Throwable t)Notifies that the body execution has aborted abnormally.
onSuccess(StepContext context, Object result)Notifies that the body execution has completed successfully.
Methods inherited from class org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback
protected abstract void finished(StepContext context) throws ExceptionCalled when the body is finished.
This method will run in the CPS VM thread and as such should not perform I/O or block. Use
context- the body context as passed to
Exception- if anything is thrown here, the step fails too
public final void onSuccess(StepContext context, Object result)Description copied from class:
BodyExecutionCallbackNotifies that the body execution has completed successfully.
StepContextgiven to this method lets you access objects that correspond to the end of the body, as opposed to the objects that correspond to the invocation of the step that invoked the body. Otherwise the context is identical in behaviour to that given to
So for example this is a good place to record any logging that's attributed to the end of the body execution.
public void onFailure(StepContext context, Throwable t)Description copied from class:
BodyExecutionCallbackNotifies that the body execution has aborted abnormally.
BodyExecutionCallback.onSuccess(StepContext, Object)for the discussion of how the given