Class AbstractStepImpl
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<Step>
-
- org.jenkinsci.plugins.workflow.steps.Step
-
- org.jenkinsci.plugins.workflow.steps.AbstractStepImpl
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Step>
public abstract class AbstractStepImpl extends Step
Partial convenient step implementation. Used withAbstractStepDescriptorImpl
andAbstractStepExecutionImpl
.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractStepImpl()
Deprecated.Directly extendStep
and avoid Guice.protected
AbstractStepImpl(boolean ignored)
Constructor for compatibility.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static com.google.inject.Injector
prepareInjector(StepContext context, Step step)
StepExecution
start(StepContext context)
Constructs a step execution automatically according toAbstractStepDescriptorImpl.getExecutionType()
.-
Methods inherited from class org.jenkinsci.plugins.workflow.steps.Step
getDescriptor
-
-
-
-
Constructor Detail
-
AbstractStepImpl
@Deprecated protected AbstractStepImpl()
Deprecated.Directly extendStep
and avoid Guice. Or seeAbstractStepImpl(boolean)
for an existing step.
-
AbstractStepImpl
protected AbstractStepImpl(boolean ignored)
Constructor for compatibility. Retain this constructor and overridestart(org.jenkinsci.plugins.workflow.steps.StepContext)
if your step historically extendedAbstractStepImpl
, and yourAbstractStepExecutionImpl
kept a non-transient
reference to theAbstractStepImpl
, for serial form compatibility. For new steps, extendStep
directly.- Parameters:
ignored
- ignored, just to differentiate this constructor fromAbstractStepImpl()
as a marker that the supertype must be retained
-
-
Method Detail
-
start
public StepExecution start(StepContext context) throws Exception
Constructs a step execution automatically according toAbstractStepDescriptorImpl.getExecutionType()
.- Specified by:
start
in classStep
- Returns:
- true if the execution of this step has synchronously completed before this method returns.
It is the callee's responsibility to set the return value via
StepContext.onSuccess(Object)
orFutureCallback.onFailure(Throwable)
. false if the asynchronous execution has started and thatStepContext
will be notified when the result comes in. (Note that the nature of asynchrony is such that it is possible for theStepContext
to be already notified before this method returns.) - Throws:
Exception
- if any exception is thrown,Step
is assumed to have completed abnormally synchronously (as ifFutureCallback.onFailure(java.lang.Throwable)
is called and the method returned true.)
-
prepareInjector
protected static com.google.inject.Injector prepareInjector(StepContext context, @Nullable Step step)
-
-