Class AbstractSynchronousNonBlockingStepExecution<T>
- java.lang.Object
-
- org.jenkinsci.plugins.workflow.steps.StepExecution
-
- org.jenkinsci.plugins.workflow.steps.AbstractStepExecutionImpl
-
- org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution<T>
-
- Type Parameters:
T
- the type of the return value (may beVoid
)
- All Implemented Interfaces:
Serializable
@Deprecated public abstract class AbstractSynchronousNonBlockingStepExecution<T> extends AbstractStepExecutionImpl
Deprecated.ExtendSynchronousNonBlockingStepExecution
and avoid Guice.Similar toAbstractSynchronousStepExecution
(it executes synchronously too) but it does not block the CPS VM thread.- See Also:
StepExecution
, Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSynchronousNonBlockingStepExecution()
Deprecated.protected
AbstractSynchronousNonBlockingStepExecution(StepContext context)
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getStatus()
Deprecated.May be overridden to provide specific information about what a step is currently doing, for diagnostic purposes.void
onResume()
Deprecated.ReinjectStepContextParameter
s.protected abstract T
run()
Deprecated.Meat of the execution.boolean
start()
Deprecated.Start execution of something and report the end result back to the given callback.void
stop(Throwable cause)
Deprecated.If the computation is going synchronously, try to cancel that.-
Methods inherited from class org.jenkinsci.plugins.workflow.steps.AbstractStepExecutionImpl
inject
-
Methods inherited from class org.jenkinsci.plugins.workflow.steps.StepExecution
applyAll, applyAll, blocksRestart, getContext, getStatusBounded
-
-
-
-
Constructor Detail
-
AbstractSynchronousNonBlockingStepExecution
protected AbstractSynchronousNonBlockingStepExecution()
Deprecated.
-
AbstractSynchronousNonBlockingStepExecution
protected AbstractSynchronousNonBlockingStepExecution(StepContext context)
Deprecated.
-
-
Method Detail
-
run
protected abstract T run() throws Exception
Deprecated.Meat of the execution. When this method returns, a step execution is over.- Throws:
Exception
-
start
public final boolean start() throws Exception
Deprecated.Description copied from class:StepExecution
Start execution of something and report the end result back to the given callback.Arguments are passed when instantiating steps.
This method will run in the CPS VM thread and as such should not perform I/O or block. Use
SynchronousNonBlockingStepExecution
orGeneralNonBlockingStepExecution
as needed.- Specified by:
start
in classStepExecution
- 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.)
-
stop
public void stop(Throwable cause) throws Exception
Deprecated.If the computation is going synchronously, try to cancel that.- Overrides:
stop
in classStepExecution
- Parameters:
cause
- Contextual information that lets the step know what resulted in stopping an executing step, passed in the hope that this will assist diagnostics.- Throws:
Exception
-
onResume
public void onResume()
Deprecated.Description copied from class:AbstractStepExecutionImpl
ReinjectStepContextParameter
s. TheStep
will not be reinjected.- Overrides:
onResume
in classAbstractStepExecutionImpl
- See Also:
SynchronousResumeNotSupportedException
-
getStatus
@NonNull public String getStatus()
Deprecated.Description copied from class:StepExecution
May be overridden to provide specific information about what a step is currently doing, for diagnostic purposes. Typical format should be a short, lowercase phrase. It should not be localized as this is intended for use by developers as well as users. May include technical details about Jenkins internals if relevant.- Overrides:
getStatus
in classStepExecution
- Returns:
- current status, or null if unimplemented
- See Also:
StepExecution.getStatusBounded(long, java.util.concurrent.TimeUnit)
-
-