Package org.apache.camel.support.task
Class ForegroundTask.ForegroundTaskBuilder
- java.lang.Object
-
- org.apache.camel.support.task.AbstractTaskBuilder<ForegroundTask>
-
- org.apache.camel.support.task.ForegroundTask.ForegroundTaskBuilder
-
- All Implemented Interfaces:
TaskBuilder<ForegroundTask>
- Enclosing class:
- ForegroundTask
public static class ForegroundTask.ForegroundTaskBuilder extends AbstractTaskBuilder<ForegroundTask>
A builder helper for building new foreground tasks
-
-
Field Summary
-
Fields inherited from class org.apache.camel.support.task.AbstractTaskBuilder
DEFAULT_NAME
-
-
Constructor Summary
Constructors Constructor Description ForegroundTaskBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ForegroundTask
build()
Builds the task of the given type for the builderForegroundTask.ForegroundTaskBuilder
withBudget(IterationBudget budget)
Sets an iteration budget for the task (i.e.: the task will not run more than the given number of iterations)ForegroundTask.ForegroundTaskBuilder
withName(String name)
Sets the name of the task-
Methods inherited from class org.apache.camel.support.task.AbstractTaskBuilder
getName
-
-
-
-
Method Detail
-
withName
public ForegroundTask.ForegroundTaskBuilder withName(String name)
Sets the name of the task- Overrides:
withName
in classAbstractTaskBuilder<ForegroundTask>
- Parameters:
name
- the name- Returns:
- an instance of this builder
-
withBudget
public ForegroundTask.ForegroundTaskBuilder withBudget(IterationBudget budget)
Sets an iteration budget for the task (i.e.: the task will not run more than the given number of iterations)- Parameters:
budget
- the budget- Returns:
- an instance of this builder
-
build
public ForegroundTask build()
Description copied from interface:TaskBuilder
Builds the task of the given type for the builder- Returns:
- a new instance of the task
-
-