public abstract static class BodyExecutionCallback.TailCall extends BodyExecutionCallback
BodyExecutionCallback.TailCall
Constructor and Description |
---|
TailCall() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
finished(StepContext context)
Called when the body is finished.
|
void |
onFailure(StepContext context,
Throwable t)
Notifies that the body execution has aborted abnormally.
|
void |
onSuccess(StepContext context,
Object result)
Notifies that the body execution has completed successfully.
|
onStart, wrap
protected abstract void finished(StepContext context) throws Exception
context
- the body context as passed to onSuccess(org.jenkinsci.plugins.workflow.steps.StepContext, java.lang.Object)
or onFailure(org.jenkinsci.plugins.workflow.steps.StepContext, java.lang.Throwable)
Exception
- if anything is thrown here, the step fails toopublic final void onSuccess(StepContext context, Object result)
BodyExecutionCallback
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 to Step.start(StepContext)
.
So for example this is a good place to record any logging that's attributed to the end of the body execution.
onSuccess
in class BodyExecutionCallback
public final void onFailure(StepContext context, Throwable t)
BodyExecutionCallback
See BodyExecutionCallback.onSuccess(StepContext, Object)
for the discussion of how
the given StepContext
behaves.
onFailure
in class BodyExecutionCallback
Copyright © 2016–2017. All rights reserved.