Package io.jmix.ui.executor.impl
Class WebBackgroundWorker
java.lang.Object
io.jmix.ui.executor.impl.WebBackgroundWorker
- All Implemented Interfaces:
BackgroundWorker
@Component("ui_BackgroundWorker")
public class WebBackgroundWorker
extends Object
implements BackgroundWorker
Web implementation of
BackgroundWorker
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationEventPublisher
protected CurrentAuthentication
protected ExecutorService
protected UiBackgroundTaskProperties
protected TimeSource
protected WatchDog
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
void
destroy()
Obtain UI access for later use from background thread.<T,
V> BackgroundTaskHandler<V> handle
(BackgroundTask<T, V> task) Create handler for a background task.void
setProperties
(UiBackgroundTaskProperties properties)
-
Field Details
-
watchDog
-
currentAuthentication
-
applicationEventPublisher
@Autowired protected org.springframework.context.ApplicationEventPublisher applicationEventPublisher -
timeSource
-
properties
-
executorService
-
-
Constructor Details
-
WebBackgroundWorker
public WebBackgroundWorker()
-
-
Method Details
-
setProperties
-
createThreadPoolExecutor
protected void createThreadPoolExecutor() -
destroy
@PreDestroy public void destroy() -
handle
Description copied from interface:BackgroundWorker
Create handler for a background task. The handler is used to control the task execution.- Specified by:
handle
in interfaceBackgroundWorker
- Type Parameters:
T
- progress measure unitV
- task result type- Parameters:
task
- background task instance- Returns:
- task handler
-
getUIAccessor
Description copied from interface:BackgroundWorker
Obtain UI access for later use from background thread. Can be invoked only from UI thread.- Specified by:
getUIAccessor
in interfaceBackgroundWorker
- Returns:
- ui accessor object that allows to read/write state of UI
-
checkUIAccess
public void checkUIAccess()- Specified by:
checkUIAccess
in interfaceBackgroundWorker
-