public abstract class Controller extends Object implements Serializable
| Constructor and Description |
|---|
Controller() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
cleanup(FilePath workspace)
Cleans up after a task is done.
|
Integer |
exitStatus(FilePath workspace)
Deprecated.
use
exitStatus(FilePath, Launcher, TaskListener) instead |
Integer |
exitStatus(FilePath workspace,
Launcher launcher)
Deprecated.
use
exitStatus(FilePath, Launcher, TaskListener) instead |
Integer |
exitStatus(FilePath workspace,
Launcher launcher,
TaskListener logger)
Checks whether the task has finished.
|
String |
getDiagnostics(FilePath workspace,
Launcher launcher)
Should be overridden to provide specific information about the status of an external process, for diagnostic purposes.
|
byte[] |
getOutput(FilePath workspace,
Launcher launcher)
Obtain the process output.
|
void |
stop(FilePath workspace)
Deprecated.
use
stop(FilePath, Launcher) instead |
void |
stop(FilePath workspace,
Launcher launcher)
Tries to stop any running task.
|
abstract boolean |
writeLog(FilePath workspace,
OutputStream sink)
Obtains any new task log output.
|
public abstract boolean writeLog(FilePath workspace, OutputStream sink) throws IOException, InterruptedException
workspace - the workspace in usesink - where to send new log outputIOExceptionInterruptedException@CheckForNull public Integer exitStatus(FilePath workspace, Launcher launcher, TaskListener logger) throws IOException, InterruptedException
workspace - the workspace in uselauncher - a way to start processeslogger - a way to report special messagesIOExceptionInterruptedException@Deprecated @CheckForNull public Integer exitStatus(FilePath workspace, Launcher launcher) throws IOException, InterruptedException
exitStatus(FilePath, Launcher, TaskListener) insteadIOExceptionInterruptedException@Deprecated @CheckForNull public Integer exitStatus(FilePath workspace) throws IOException, InterruptedException
exitStatus(FilePath, Launcher, TaskListener) insteadIOExceptionInterruptedException@Nonnull public byte[] getOutput(@Nonnull FilePath workspace, @Nonnull 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(FilePath workspace, Launcher launcher) throws IOException, InterruptedException
workspace - the workspace in uselauncher - a way to start processesIOExceptionInterruptedExceptionpublic void stop(FilePath workspace) throws IOException, InterruptedException
stop(FilePath, Launcher) insteadIOExceptionInterruptedExceptionpublic abstract void cleanup(FilePath workspace) throws IOException, InterruptedException
DurableTask.launch(hudson.EnvVars, hudson.FilePath, hudson.Launcher, hudson.model.TaskListener).workspace - the workspace in useIOExceptionInterruptedExceptionpublic String getDiagnostics(FilePath workspace, Launcher launcher) throws IOException, InterruptedException
Object.toString() by defaultIOExceptionInterruptedExceptionCopyright © 2016–2018. All rights reserved.