Module is.codion.swing.common.model
Interface ProgressWorker.BuilderFactory
- Enclosing class:
ProgressWorker<T,V>
public static sealed interface ProgressWorker.BuilderFactory
Provides builders for a given task type.
If the task also implements the corresponding handler interface (e.g. ProgressWorker.TaskHandler,
ProgressWorker.ResultTaskHandler), the handler methods are automatically wired first.
Additional handlers can then be added via the returned ProgressWorker.Builder,
and are called after the handler interface methods, in the order they were added.
-
Method Summary
Modifier and TypeMethodDescription<T,V> ProgressWorker.Builder <T, V> task(ProgressWorker.ProgressResultTask<T, V> task) <V> ProgressWorker.Builder<?, V> task(ProgressWorker.ProgressTask<V> task) <T> ProgressWorker.Builder<T, ?> task(ProgressWorker.ResultTask<T> task) task(ProgressWorker.Task task)
-
Method Details
-
task
- Parameters:
task- the task to run, if it implementsProgressWorker.TaskHandlerits handler methods are wired automatically- Returns:
- a new
ProgressWorker.Builderinstance
-
task
- Type Parameters:
T- the worker result type- Parameters:
task- the task to run, if it implementsProgressWorker.ResultTaskHandlerits handler methods are wired automatically- Returns:
- a new
ProgressWorker.Builderinstance
-
task
- Type Parameters:
V- the intermediate result type- Parameters:
task- the task to run, if it implementsProgressWorker.ProgressTaskHandlerits handler methods are wired automatically- Returns:
- a new
ProgressWorker.Builderinstance
-
task
- Type Parameters:
T- the worker result typeV- the intermediate result type- Parameters:
task- the task to run, if it implementsProgressWorker.ProgressResultTaskHandlerits handler methods are wired automatically- Returns:
- a new
ProgressWorker.Builderinstance
-