Class GeneralNonBlockingStepExecution.TailCall
java.lang.Object
org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback
org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.TailCall
- All Implemented Interfaces:
Serializable
- Enclosing class:
- GeneralNonBlockingStepExecution
Variant of
BodyExecutionCallback.TailCall
which wraps finished(org.jenkinsci.plugins.workflow.steps.StepContext)
in GeneralNonBlockingStepExecution.run(org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.Block)
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback
BodyExecutionCallback.TailCall
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
finished
(StepContext context) Called when the body is finished.final void
onFailure
(StepContext context, Throwable t) Notifies that the body execution has aborted abnormally.final void
onSuccess
(StepContext context, Object result) Notifies that the body execution has completed successfully.Methods inherited from class org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback
onStart, wrap
-
Constructor Details
-
TailCall
protected TailCall()
-
-
Method Details
-
finished
Called when the body is finished.- Parameters:
context
- the body context as passed toonSuccess(org.jenkinsci.plugins.workflow.steps.StepContext, java.lang.Object)
oronFailure(org.jenkinsci.plugins.workflow.steps.StepContext, java.lang.Throwable)
- Throws:
Exception
- if anything is thrown here, the step fails too
-
onSuccess
Description copied from class:BodyExecutionCallback
Notifies that the body execution has completed successfully.StepContext
given 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 toStep.start(StepContext)
.So for example this is a good place to record any logging that's attributed to the end of the body execution.
- Specified by:
onSuccess
in classBodyExecutionCallback
-
onFailure
Description copied from class:BodyExecutionCallback
Notifies that the body execution has aborted abnormally.See
BodyExecutionCallback.onSuccess(StepContext, Object)
for the discussion of how the givenStepContext
behaves.- Specified by:
onFailure
in classBodyExecutionCallback
-