Class SSHStepExecution<T>
- java.lang.Object
-
- org.jenkinsci.plugins.workflow.steps.StepExecution
-
- org.jenkinsci.plugins.sshsteps.util.SSHStepExecution<T>
-
- Type Parameters:
T
- the type of the return value (may beVoid
)
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CommandStep.Execution
,GetStep.Execution
,PutStep.Execution
,RemoveStep.Execution
,ScriptStep.Execution
public abstract class SSHStepExecution<T> extends org.jenkinsci.plugins.workflow.steps.StepExecution
Non blocking step execution for ssh steps.- Author:
- Naresh Rayapati
- See Also:
StepExecution
, Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SSHStepExecution(BasicSSHStep step, org.jenkinsci.plugins.workflow.steps.StepContext context)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected hudson.remoting.VirtualChannel
getChannel()
Launcher
getLauncher()
TaskListener
getListener()
String
getStatus()
BasicSSHStep
getStep()
void
onResume()
protected abstract T
run()
Meat of the execution.boolean
start()
void
stop(Throwable cause)
If the computation is going synchronously, try to cancel that.
-
-
-
Constructor Detail
-
SSHStepExecution
protected SSHStepExecution(BasicSSHStep step, @Nonnull org.jenkinsci.plugins.workflow.steps.StepContext context) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
-
Method Detail
-
run
protected abstract T run() throws Exception
Meat of the execution. When this method returns, a step execution is over.- Throws:
Exception
-
getChannel
protected hudson.remoting.VirtualChannel getChannel()
-
start
public final boolean start()
- Specified by:
start
in classorg.jenkinsci.plugins.workflow.steps.StepExecution
-
stop
public void stop(Throwable cause) throws Exception
If the computation is going synchronously, try to cancel that.- Overrides:
stop
in classorg.jenkinsci.plugins.workflow.steps.StepExecution
- Throws:
Exception
-
onResume
public void onResume()
- Overrides:
onResume
in classorg.jenkinsci.plugins.workflow.steps.StepExecution
-
getStatus
@Nonnull public String getStatus()
- Overrides:
getStatus
in classorg.jenkinsci.plugins.workflow.steps.StepExecution
-
getListener
public TaskListener getListener()
-
getLauncher
public Launcher getLauncher()
-
getStep
public BasicSSHStep getStep()
-
-