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
public abstract class AbstractStepExecutionImpl extends StepExecution
Partial implementation ofStepExecution
that injectsStepContextParameter
upon resume. Declare anytransient
fields withStepContextParameter
that you might need.The originating
Step
may also beInject
ed. It must be markedInject.optional()
. Normally it is only used for the benefit ofStepExecution.start()
, so it should betransient
. Beware that injecting a step this way does not currently work if that step has a no-argument (“default”) constructor (typically aDataBoundConstructor
).If you need any information from the step definition after a restart, make sure the
Step
isSerializable
and do not mark ittransient
. (For aAbstractSynchronousStepExecution
these considerations are irrelevant.)- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractStepExecutionImpl()
Deprecated.Directly extendStepExecution
and avoid Guice for a new step.protected
AbstractStepExecutionImpl(StepContext context)
Constructor for compatibility.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected 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 Detail
-
AbstractStepExecutionImpl
@Deprecated protected AbstractStepExecutionImpl()
Deprecated.Directly extendStepExecution
and avoid Guice for a new step. Or seeAbstractStepExecutionImpl(StepContext)
for an existing step.
-
AbstractStepExecutionImpl
protected AbstractStepExecutionImpl(StepContext context)
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 Detail
-
onResume
public void onResume()
ReinjectStepContextParameter
s. TheStep
will not be reinjected.- Overrides:
onResume
in classStepExecution
- See Also:
SynchronousResumeNotSupportedException
-
inject
@Deprecated protected void inject()
Deprecated.
-
-