Class BackgroundWorkerImpl

java.lang.Object
io.jmix.flowui.backgroundtask.impl.BackgroundWorkerImpl
All Implemented Interfaces:
BackgroundWorker

@Component("flowui_BackgroundWorkerImpl") public class BackgroundWorkerImpl extends Object implements BackgroundWorker
Implementation of BackgroundWorker.
  • Field Details

    • backgroundTaskWatchDog

      @Autowired protected BackgroundTaskWatchDog backgroundTaskWatchDog
    • currentAuthentication

      @Autowired protected CurrentAuthentication currentAuthentication
    • applicationEventPublisher

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

      @Autowired protected TimeSource timeSource
    • properties

      protected FlowuiBackgroundTaskProperties properties
    • executorService

      protected ExecutorService executorService
  • Constructor Details

    • BackgroundWorkerImpl

      public BackgroundWorkerImpl()
  • Method Details

    • setProperties

      @Autowired public void setProperties(FlowuiBackgroundTaskProperties 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
      Creates 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
      Obtains 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