Package io.jmix.flowui.backgroundtask
Interface BackgroundTask.ProgressListener<T,V>
- Type Parameters:
T
- progress measurement unitV
- result type
- All Known Implementing Classes:
BackgroundTask.ProgressListenerAdapter
- Enclosing class:
- BackgroundTask<T,
V>
public static interface BackgroundTask.ProgressListener<T,V>
Listener of the task life cycle events, complementary to the tasks own methods:
BackgroundTask.progress(List)
, BackgroundTask.done(Object)
,
BackgroundTask.canceled()
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
onCancel()
Called by the execution environment in UI thread if the task is canceled.void
Called by the execution environment in UI thread when the task is completed.void
onProgress
(List<T> changes) Called by the execution environment in UI thread on progress change.
-
Method Details
-
onProgress
Called by the execution environment in UI thread on progress change.- Parameters:
changes
- list of changes since previous invocation
-
onDone
Called by the execution environment in UI thread when the task is completed.- Parameters:
result
- result of execution returned byBackgroundTask.run(TaskLifeCycle)
method
-
onCancel
void onCancel()Called by the execution environment in UI thread if the task is canceled.
-