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>
Partial convenient step implementation.
Used with
AbstractStepDescriptorImpl
and AbstractStepExecutionImpl
.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ModifierConstructorDescriptionprotected
Deprecated.protected
AbstractStepImpl
(boolean ignored) Constructor for compatibility. -
Method Summary
Modifier and TypeMethodDescriptionprotected static com.google.inject.Injector
prepareInjector
(StepContext context, Step step) start
(StepContext context) Constructs a step execution automatically according toAbstractStepDescriptorImpl.getExecutionType()
.Methods inherited from class org.jenkinsci.plugins.workflow.steps.Step
getDescriptor
-
Constructor Details
-
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 Details
-
start
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.)- See Also:
-
prepareInjector
protected static com.google.inject.Injector prepareInjector(StepContext context, @Nullable Step step)
-
Step
and avoid Guice.