id, name, observable
Constructor and Description |
---|
ExecutableTask(String id,
String name,
ProgressObservable observable,
ProgressObserver observer,
PartialResultHolder<R> partialResultHolder,
Function<ExecutionMonitoring<R>,R> method) |
ExecutableTask(String id,
String name,
ProgressObservable observable,
ProgressObserver observer,
PartialResultProvider<R> partialResultProvider,
PartialResultConsumer<R> partialResultConsumer,
Function<ExecutionMonitoring<R>,R> method) |
ExecutableTask(String id,
String name,
T observableObserver,
Consumer<ExecutionMonitoring<R>> method) |
ExecutableTask(String id,
String name,
T observableObserver,
Function<ExecutionMonitoring<R>,R> method) |
ExecutableTask(String id,
String name,
T observableObserver,
PartialResultHolder<R> partialResultHolder,
Function<ExecutionMonitoring<R>,R> method) |
Modifier and Type | Method and Description |
---|---|
R |
execute()
Starts task, executes method, then "done"-s observer.
|
PartialResultProvider<R> |
getPartialResultProvider() |
boolean |
isCancelled() |
getEndTimeMs, getStartTimeMs, start
public ExecutableTask(String id, String name, T observableObserver, Consumer<ExecutionMonitoring<R>> method)
public ExecutableTask(String id, String name, T observableObserver, Function<ExecutionMonitoring<R>,R> method)
public ExecutableTask(String id, String name, T observableObserver, PartialResultHolder<R> partialResultHolder, Function<ExecutionMonitoring<R>,R> method)
public ExecutableTask(String id, String name, ProgressObservable observable, ProgressObserver observer, PartialResultHolder<R> partialResultHolder, Function<ExecutionMonitoring<R>,R> method)
public ExecutableTask(String id, String name, ProgressObservable observable, ProgressObserver observer, PartialResultProvider<R> partialResultProvider, PartialResultConsumer<R> partialResultConsumer, Function<ExecutionMonitoring<R>,R> method)
public R execute()
null
if method is a consumer that has no result instead of a function.CancellationException
- if thrown by methodException
- if thrown by methodpublic boolean isCancelled()
public PartialResultProvider<R> getPartialResultProvider()