protected static class FileMonitoringTask.FileMonitoringController extends Controller
| Modifier | Constructor and Description |
|---|---|
protected |
FileMonitoringController(hudson.FilePath ws) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(hudson.FilePath workspace)
Cleans up after a task is done.
|
hudson.FilePath |
controlDir(hudson.FilePath ws)
Directory in which this controller can place files.
|
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.
|
hudson.FilePath |
getLogFile(hudson.FilePath workspace)
File in which the stdout/stderr (or, if
DurableTask.captureOutput() is called, just stderr) is written. |
byte[] |
getOutput(hudson.FilePath workspace,
hudson.Launcher launcher)
Obtain the process output.
|
hudson.FilePath |
getOutputFile(hudson.FilePath workspace)
File in which the stdout is written, if
DurableTask.captureOutput() is called. |
hudson.FilePath |
getResultFile(hudson.FilePath workspace)
File in which the exit code of the process should be reported.
|
void |
stop(hudson.FilePath workspace,
hudson.Launcher launcher)
Tries to stop any running task.
|
boolean |
writeLog(hudson.FilePath workspace,
OutputStream sink)
Obtains any new task log output.
|
exitStatus, stopprotected FileMonitoringController(hudson.FilePath ws)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic final boolean writeLog(hudson.FilePath workspace,
OutputStream sink)
throws IOException,
InterruptedException
ControllerwriteLog in class Controllerworkspace - the workspace in usesink - where to send new log outputIOExceptionInterruptedExceptionpublic Integer exitStatus(hudson.FilePath workspace, hudson.Launcher launcher) throws IOException, InterruptedException
ControllerexitStatus in class Controllerworkspace - the workspace in uselauncher - a way to start processesIOExceptionInterruptedExceptionpublic byte[] getOutput(hudson.FilePath workspace,
hudson.Launcher launcher)
throws IOException,
InterruptedException
ControllerController.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.getOutput in class Controllerworkspace - the workspace in uselauncher - a way to start processesIOExceptionInterruptedExceptionpublic final void stop(hudson.FilePath workspace,
hudson.Launcher launcher)
throws IOException,
InterruptedException
Controllerstop in class Controllerworkspace - the workspace in uselauncher - a way to start processesIOExceptionInterruptedExceptionpublic void cleanup(hudson.FilePath workspace)
throws IOException,
InterruptedException
ControllerDurableTask.launch(hudson.EnvVars, hudson.FilePath, hudson.Launcher, hudson.model.TaskListener).cleanup in class Controllerworkspace - the workspace in useIOExceptionInterruptedExceptionpublic hudson.FilePath controlDir(hudson.FilePath ws)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic hudson.FilePath getResultFile(hudson.FilePath workspace)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic hudson.FilePath getLogFile(hudson.FilePath workspace)
throws IOException,
InterruptedException
DurableTask.captureOutput() is called, just stderr) is written.IOExceptionInterruptedExceptionpublic hudson.FilePath getOutputFile(hudson.FilePath workspace)
throws IOException,
InterruptedException
DurableTask.captureOutput() is called.IOExceptionInterruptedExceptionpublic String getDiagnostics(hudson.FilePath workspace, hudson.Launcher launcher) throws IOException, InterruptedException
ControllergetDiagnostics in class ControllerObject.toString() by defaultIOExceptionInterruptedExceptionCopyright © 2016–2017. All rights reserved.