| Modifier and Type | Class and Description |
|---|---|
class |
ConfigurableTask
Wrapper that adds convinience methods to any task
|
class |
DelegatingTask
This class allows to dynamically change behaviour of the task
#set method can be used to change current behaviour
|
class |
ParallelTask
Task that runs it's subtasks in parallel
Close methods are run sequentially
|
class |
RepeatingTask
Task that when run repeatedly calles run method of it's subtask
Given pause is performed between invokations of subtask
Stop method breaks repeating cycle
|
class |
RunnableTask
Task that runs given Runnable action
|
class |
SequenceTask
Run it's subtasks in sequence
|
| Modifier and Type | Method and Description |
|---|---|
Task |
TaskFactory.createClosingTask() |
Task |
TaskFactory.createWorkTask() |
| Modifier and Type | Method and Description |
|---|---|
ConfigurableTask |
ConfigurableTask.andThen(Task thatTask)
Returns new task.
|
static ConfigurableTask |
Tasks.closeAfterEachRun(Task task)
Returns task that behaves the same as a Task passed
but performes cleanup as the last action performed by run method.
|
static ConfigurableTask |
Tasks.closingTaskFor(Task task)
Returns task that performs cleanup for the original task when run.
|
static ConfigurableTask |
Tasks.configure(Task task)
Wrapps task.
|
static ConfigurableTask |
Tasks.log(Task task,
Logger logger,
String name)
Create task that logs invocation of it's methods
|
static ConfigurableTask |
Tasks.parallel(Task... tasks) |
static ConfigurableTask |
Tasks.repeat(Task task)
Repeat given task
|
static ConfigurableTask |
Tasks.repeat(Task task,
long pause,
TimeUnit unit)
Repeat given task with pauses between task invocation
|
static ConfigurableTask |
Tasks.sequence(Task... tasks) |
void |
DelegatingTask.set(Task task)
Changes current behaviour to new passed as a parameter
|
static Thread |
Tasks.spawn(Task task)
Runs given task in a new thread
|
static ConfigurableTask |
Tasks.swallowExceptions(Task task,
Logger logger,
long pause,
TimeUnit unit)
Creates new task that catches all exceptions of it's subtask.
|
static ConfigurableTask |
Tasks.unstoppable(Task task)
Returns task that can't be stopped externally.
|
static ConfigurableTask |
Tasks.withAdditinalClosingAction(Task task,
Runnable closingAction)
Returns task that behaves like the original task but performs additinal cleanup action
Resulting task's Task#close method calls original task's Task#close method and
given closingAction
|
static ConfigurableTask |
Tasks.withoutClose(Task task)
Returns task that doesn't perfom cleanup.
|
| Modifier and Type | Method and Description |
|---|---|
static ConfigurableTask |
Tasks.parallel(List<? extends Task> tasks) |
static ConfigurableTask |
Tasks.sequence(List<? extends Task> tasks) |
| Constructor and Description |
|---|
ConfigurableTask(Task task) |
DelegatingTask(Task task) |
ParallelTask(Task[] tasks) |
RepeatingTask(Task task,
long pause) |
SequenceTask(Task[] tasks) |
Copyright © 2013. All Rights Reserved.