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 Inject
ed.
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
ModifierConstructorDescriptionprotected
Deprecated.protected
AbstractStepExecutionImpl
(StepContext context) Constructor for compatibility. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
inject()
Deprecated.void
onResume()
ReinjectStepContextParameter
s.Methods inherited from class org.jenkinsci.plugins.workflow.steps.StepExecution
applyAll, applyAll, blocksRestart, getContext, getStatus, getStatusBounded, start, stop
-
Constructor Details
-
AbstractStepExecutionImpl
Deprecated.Directly extendStepExecution
and 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 thesuper
implementation) if your execution historically extendedAbstractStepExecutionImpl
, for serial form compatibility. For new steps, extendStepExecution
directly.
-
-
Method Details
-
onResume
public void onResume()ReinjectStepContextParameter
s. TheStep
will not be reinjected.- Overrides:
onResume
in classStepExecution
- See Also:
-
inject
Deprecated.
-
StepExecution
and avoid Guice for a new step.