Package org.jvnet.hudson.reactor
Class TaskGraphBuilder
- java.lang.Object
-
- org.jvnet.hudson.reactor.TaskBuilder
-
- org.jvnet.hudson.reactor.TaskGraphBuilder
-
public class TaskGraphBuilder extends TaskBuilder
Builder/fluent-API pattern to build up a series of related tasks.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTaskGraphBuilder.HandleHandle to the task.
-
Field Summary
-
Fields inherited from class org.jvnet.hudson.reactor.TaskBuilder
EMPTY_BUILDER
-
-
Constructor Summary
Constructors Constructor Description TaskGraphBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaskGraphBuilder.Handleadd(String displayName, Executable e)Adds a new work unit and returns its handle, which can then be used to set up dependencies among them.TaskGraphBuilderattains(Milestone... milestones)Given milestones will be set as achievements for the next task.Iterable<? extends Task>discoverTasks(Reactor reactor)Returns all the tasks that this builder contributes to.TaskGraphBuilderfollowedBy()Indicates that the task to be added requires the completion of the last added task.TaskGraphBuildernotFatal()TaskGraphBuilderrequires(Milestone... milestones)Given milestones will be set as pre-requisites for the next task to be added.-
Methods inherited from class org.jvnet.hudson.reactor.TaskBuilder
fromTasks, union, union
-
-
-
-
Method Detail
-
discoverTasks
public Iterable<? extends Task> discoverTasks(Reactor reactor) throws IOException
Description copied from class:TaskBuilderReturns all the tasks that this builder contributes to.- Specified by:
discoverTasksin classTaskBuilder- Throws:
IOException
-
add
public TaskGraphBuilder.Handle add(String displayName, Executable e)
Adds a new work unit and returns its handle, which can then be used to set up dependencies among them.- Parameters:
displayName- Display name of the task.e- The actual work.
-
followedBy
public TaskGraphBuilder followedBy()
Indicates that the task to be added requires the completion of the last added task.
-
requires
public TaskGraphBuilder requires(Milestone... milestones)
Given milestones will be set as pre-requisites for the next task to be added.
-
attains
public TaskGraphBuilder attains(Milestone... milestones)
Given milestones will be set as achievements for the next task.
-
notFatal
public TaskGraphBuilder notFatal()
-
-