Class ActionExecutor

    • Method Detail

      • removeActionExecutorListener

        public void removeActionExecutorListener​(ActionExecutorListener listener)
      • addAction

        public ActionWorker<?,​?> addAction​(String actionLabel,
                                                 Runnable action)
        Add an new action to perform.
        Parameters:
        actionLabel - the name of the action to perform
        action - the action to perform
        Returns:
        the worker that will launch the action
      • close

        public void close()
        Ask the stop any running actions.

        It will finish all incoming files (but will not accept more tasks).

        Note: The method does not return until all tasks are not consumed.

        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
      • getNbActions

        public int getNbActions()
      • getWorkersExecutorService

        public ThreadPoolExecutor getWorkersExecutorService()
        On surcharge celui offer par SwingWorker car le corepool est à 1 et cela ne permet pas d'exécuter plusieurs actions en même temps... necessary.
        Returns:
        ExecutorService for the ActionWorker