Class SynchNonBlockingStepExecution<T>

  • Type Parameters:
    T - the type of the return value (may be Void)
    All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    PublishWebhookStep.PublishWebhookStepExecution

    public abstract class SynchNonBlockingStepExecution<T>
    extends org.jenkinsci.plugins.workflow.steps.StepExecution
    Similar to SynchronousStepExecution (it executes synchronously too) but it does not block the CPS VM thread.
    See Also:
    StepExecution, Serialized Form
    • Constructor Detail

      • SynchNonBlockingStepExecution

        protected SynchNonBlockingStepExecution​(@Nonnull
                                                org.jenkinsci.plugins.workflow.steps.StepContext context)
    • Method Detail

      • run

        protected abstract T run()
                          throws Exception
        Meat of the execution. When this method returns, a step execution is over.
        Throws:
        Exception
      • start

        public final boolean start()
                            throws Exception
        Specified by:
        start in class org.jenkinsci.plugins.workflow.steps.StepExecution
        Throws:
        Exception
      • stop

        public void stop​(Throwable cause)
                  throws Exception
        If the computation is going synchronously, try to cancel that.
        Overrides:
        stop in class org.jenkinsci.plugins.workflow.steps.StepExecution
        Throws:
        Exception
      • onResume

        public void onResume()
        Overrides:
        onResume in class org.jenkinsci.plugins.workflow.steps.StepExecution
      • getStatus

        @Nonnull
        public String getStatus()
        Overrides:
        getStatus in class org.jenkinsci.plugins.workflow.steps.StepExecution