public static class TasksHandler.Builder
extends java.lang.Object
TasksHandler
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
TasksHandler |
build()
Builds the
TasksHandler . |
TasksHandler.Builder |
listener(TasksHandler.TasksListener listener)
Define a
TasksHandler.TasksListener to be registered. |
TasksHandler.Builder |
persist(StateMachinePersist<java.lang.String,java.lang.String,java.lang.Void> persist)
Define a
StateMachinePersist implementation if state machine
should be persisted with state changes. |
TasksHandler.Builder |
task(java.lang.Object parent,
java.lang.Object id,
java.lang.Runnable runnable)
Define a sub-task with a reference to its parent.
|
TasksHandler.Builder |
task(java.lang.Object id,
java.lang.Runnable runnable)
Define a top-level task.
|
TasksHandler.Builder |
taskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
Define a
TaskExecutor to be used. |
public TasksHandler.Builder task(java.lang.Object id, java.lang.Runnable runnable)
id
- the idrunnable
- the runnablepublic TasksHandler.Builder task(java.lang.Object parent, java.lang.Object id, java.lang.Runnable runnable)
parent
- the parentid
- the idrunnable
- the runnablepublic TasksHandler.Builder persist(StateMachinePersist<java.lang.String,java.lang.String,java.lang.Void> persist)
StateMachinePersist
implementation if state machine
should be persisted with state changes.persist
- the persistpublic TasksHandler.Builder listener(TasksHandler.TasksListener listener)
TasksHandler.TasksListener
to be registered.listener
- the tasks listenerpublic TasksHandler.Builder taskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
TaskExecutor
to be used. Default executor will be
a ThreadPoolTaskExecutor
set with a thread pool size of
a top-level task count.taskExecutor
- the task executorpublic TasksHandler build()
TasksHandler
.