Package io.jmix.flowui.backgroundtask
Interface BackgroundWorker
- All Known Implementing Classes:
BackgroundWorkerImpl
public interface BackgroundWorker
Entry point to
BackgroundTask execution functionality.-
Method Summary
Modifier and TypeMethodDescriptionvoidObtains UI access for later use from background thread.<T,V> BackgroundTaskHandler<V> handle(BackgroundTask<T, V> task) Creates handler for a background task.
-
Method Details
-
handle
Creates handler for a background task. The handler is used to control the task execution.- Type Parameters:
T- progress measure unitV- task result type- Parameters:
task- background task instance- Returns:
- task handler
- Throws:
IllegalConcurrentAccessException- in case of call from non UI thread
-
getUIAccessor
UIAccessor getUIAccessor()Obtains UI access for later use from background thread. Can be invoked only from UI thread.- Returns:
- ui accessor object that allows to read/write state of UI
- Throws:
IllegalConcurrentAccessException- in case of call from non UI thread
-
checkUIAccess
void checkUIAccess()- Throws:
IllegalConcurrentAccessException- in case of call from non UI thread
-