Class DurableTask
- All Implemented Interfaces:
 ExtensionPoint,Describable<DurableTask>
- Direct Known Subclasses:
 FileMonitoringTask
public abstract class DurableTask
extends AbstractDescribableImpl<DurableTask>
implements ExtensionPoint
A task which may be run asynchronously on a build node and withstand disconnection of the slave agent.
 Should have a descriptor, and a 
config.jelly for form data binding.- 
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidRequests that standard output of the task be captured rather than streamed.voidRequests that a specified charset be used to transcode process output.voidRequests that the node’s system charset be used to transcode process output.abstract Controllerlaunch(EnvVars env, FilePath workspace, Launcher launcher, TaskListener listener) Launches a durable task. 
- 
Constructor Details
- 
DurableTask
public DurableTask() 
 - 
 - 
Method Details
- 
getDescriptor
- Specified by:
 getDescriptorin interfaceDescribable<DurableTask>- Overrides:
 getDescriptorin classAbstractDescribableImpl<DurableTask>
 - 
launch
public abstract Controller launch(EnvVars env, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException Launches a durable task.- Parameters:
 env- basic environment variables to use during launchworkspace- the workspace to uselauncher- a way to start processeslistener- log output for the build- Returns:
 - a way to check up on the task’s subsequent status
 - Throws:
 IOExceptionInterruptedException
 - 
captureOutput
Requests that standard output of the task be captured rather than streamed. If you useController.watch(hudson.FilePath, org.jenkinsci.plugins.durabletask.Handler, hudson.model.TaskListener), standard output will not be sent toHandler.output(java.io.InputStream); it will be included inHandler.exited(int, byte[])instead. Otherwise (using polling mode), standard output will not be sent toController.writeLog(hudson.FilePath, java.io.OutputStream); callController.getOutput(hudson.FilePath, hudson.Launcher)to collect. Standard error should still be streamed to the log. Should be called prior tolaunch(hudson.EnvVars, hudson.FilePath, hudson.Launcher, hudson.model.TaskListener)to take effect.- Throws:
 UnsupportedOperationException- if this implementation does not support that mode
 - 
charset
Requests that a specified charset be used to transcode process output. The encoding ofController.writeLog(hudson.FilePath, java.io.OutputStream)andController.getOutput(hudson.FilePath, hudson.Launcher)is then presumed to be UTF-8. If not called, no translation is performed.- Parameters:
 cs- the character set in which process output is expected to be
 - 
defaultCharset
public void defaultCharset()Requests that the node’s system charset be used to transcode process output. The encoding ofController.writeLog(hudson.FilePath, java.io.OutputStream)andController.getOutput(hudson.FilePath, hudson.Launcher)is then presumed to be UTF-8. If not called, no translation is performed. 
 -