public abstract class Controller extends Object implements Serializable
| Constructor and Description |
|---|
Controller() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
cleanup(hudson.FilePath workspace)
Cleans up after a task is done.
|
Integer |
exitStatus(hudson.FilePath workspace)
Deprecated.
use
exitStatus(FilePath, Launcher) instead |
Integer |
exitStatus(hudson.FilePath workspace,
hudson.Launcher launcher)
Checks whether the task has finished.
|
String |
getDiagnostics(hudson.FilePath workspace,
hudson.Launcher launcher)
Should be overridden to provide specific information about the status of an external process, for diagnostic purposes.
|
byte[] |
getOutput(hudson.FilePath workspace,
hudson.Launcher launcher)
Obtain the process output.
|
void |
stop(hudson.FilePath workspace)
Deprecated.
use
stop(FilePath, Launcher) instead |
void |
stop(hudson.FilePath workspace,
hudson.Launcher launcher)
Tries to stop any running task.
|
abstract boolean |
writeLog(hudson.FilePath workspace,
OutputStream sink)
Obtains any new task log output.
|
public abstract boolean writeLog(hudson.FilePath workspace,
OutputStream sink)
throws IOException,
InterruptedException
workspace - the workspace in usesink - where to send new log outputIOExceptionInterruptedException@CheckForNull public Integer exitStatus(hudson.FilePath workspace, hudson.Launcher launcher) throws IOException, InterruptedException
workspace - the workspace in uselauncher - a way to start processesIOExceptionInterruptedException@CheckForNull public Integer exitStatus(hudson.FilePath workspace) throws IOException, InterruptedException
exitStatus(FilePath, Launcher) insteadIOExceptionInterruptedException@Nonnull public byte[] getOutput(@Nonnull hudson.FilePath workspace, @Nonnull hudson.Launcher launcher) throws IOException, InterruptedException
exitStatus(FilePath, Launcher) has returned a non-null status.
The result is undefined if DurableTask.captureOutput() was not called before launch; generally an IOException will result.workspace - the workspace in uselauncher - a way to start processesIOExceptionInterruptedExceptionpublic void stop(hudson.FilePath workspace,
hudson.Launcher launcher)
throws IOException,
InterruptedException
workspace - the workspace in uselauncher - a way to start processesIOExceptionInterruptedExceptionpublic void stop(hudson.FilePath workspace)
throws IOException,
InterruptedException
stop(FilePath, Launcher) insteadIOExceptionInterruptedExceptionpublic abstract void cleanup(hudson.FilePath workspace)
throws IOException,
InterruptedException
DurableTask.launch(hudson.EnvVars, hudson.FilePath, hudson.Launcher, hudson.model.TaskListener).workspace - the workspace in useIOExceptionInterruptedExceptionpublic String getDiagnostics(hudson.FilePath workspace, hudson.Launcher launcher) throws IOException, InterruptedException
Object.toString() by defaultIOExceptionInterruptedExceptionCopyright © 2016–2017. All rights reserved.