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 Details

    • watchDog

      @Autowired protected WatchDog watchDog
    • currentAuthentication

      @Autowired protected CurrentAuthentication currentAuthentication
    • applicationEventPublisher

      @Autowired protected org.springframework.context.ApplicationEventPublisher applicationEventPublisher
    • timeSource

      @Autowired protected TimeSource timeSource
    • properties

      protected UiBackgroundTaskProperties properties
    • executorService

      protected ExecutorService executorService
  • Constructor Details

    • WebBackgroundWorker

      public WebBackgroundWorker()
  • Method Details

    • setProperties

      @Autowired public void setProperties(UiBackgroundTaskProperties properties)
    • createThreadPoolExecutor

      protected void createThreadPoolExecutor()
    • destroy

      @PreDestroy public void destroy()
    • handle

      public <T, V> BackgroundTaskHandler<V> handle(BackgroundTask<T,V> task)
      Description copied from interface: BackgroundWorker
      Create handler for a background task. The handler is used to control the task execution.
      Specified by:
      handle in interface BackgroundWorker
      Type Parameters:
      T - progress measure unit
      V - task result type
      Parameters:
      task - background task instance
      Returns:
      task handler
    • getUIAccessor

      public UIAccessor 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 interface BackgroundWorker
      Returns:
      ui accessor object that allows to read/write state of UI
    • checkUIAccess

      public void checkUIAccess()
      Specified by:
      checkUIAccess in interface BackgroundWorker