Class AbstractStepExecutionImpl
java.lang.Object
org.jenkinsci.plugins.workflow.steps.StepExecution
org.jenkinsci.plugins.workflow.steps.AbstractStepExecutionImpl
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractSynchronousNonBlockingStepExecution,AbstractSynchronousStepExecution
Partial implementation of
StepExecution that injects StepContextParameter upon resume.
Declare any transient fields with StepContextParameter that you might need.
The originating Step may also be Injected.
It must be marked Inject.optional().
Normally it is only used for the benefit of StepExecution.start(), so it should be transient.
Beware that injecting a step this way does not currently work if that step
has a no-argument (“default”) constructor (typically a DataBoundConstructor).
If you need any information from the step definition after a restart,
make sure the Step is Serializable and do not mark it transient.
(For a AbstractSynchronousStepExecution these considerations are irrelevant.)
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.protectedAbstractStepExecutionImpl(StepContext context) Constructor for compatibility. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidinject()Deprecated.voidonResume()ReinjectStepContextParameters.Methods inherited from class org.jenkinsci.plugins.workflow.steps.StepExecution
acceptAll, acceptAll, applyAll, applyAll, blocksRestart, getContext, getStatus, getStatusBounded, start, stop
-
Constructor Details
-
AbstractStepExecutionImpl
Deprecated.Directly extendStepExecutionand avoid Guice for a new step. Or seeAbstractStepExecutionImpl(StepContext)for an existing step. -
AbstractStepExecutionImpl
Constructor for compatibility. Retain this constructor and overrideonResume()(do not call thesuperimplementation) if your execution historically extendedAbstractStepExecutionImpl, for serial form compatibility. For new steps, extendStepExecutiondirectly.
-
-
Method Details
-
onResume
public void onResume()ReinjectStepContextParameters. TheStepwill not be reinjected.- Overrides:
onResumein classStepExecution- See Also:
-
inject
Deprecated.
-
StepExecutionand avoid Guice for a new step.