public interface UiExecutorProvider
| Modifier and Type | Method and Description |
|---|---|
TaskExecutor |
getSimpleExecutor(boolean alwaysExecuteLater)
Returns a
TaskExecutor which executes tasks submitted to
them on the UI thread of the associated UI framework. |
TaskExecutor |
getStrictExecutor(boolean alwaysExecuteLater)
Returns a
TaskExecutor which executes tasks submitted to
them on the UI thread of the associated UI framework. |
TaskExecutor getSimpleExecutor(boolean alwaysExecuteLater)
TaskExecutor which executes tasks submitted to
them on the UI thread of the associated UI framework. The returned executor
does not necessarily executes tasks in the same order as the tasks were
submitted. In case tasks needed to be executed in the same order as they
were submitted to the executor: Use the
getStrictExecutor(boolean) method.alwaysExecuteLater - if this argument is true, submitted
tasks are never executed synchronously on the calling thread (i.e.:
if the calling thread is the UI thread, the framework must execute the scheduled
task later). In case this argument is false, tasks submitted from an UI
thread will be executed immediately on the calling thread.TaskExecutor which executes tasks submitted to
them on the UI thread of the associated UI framework. This method never returns
null.TaskExecutor getStrictExecutor(boolean alwaysExecuteLater)
TaskExecutor which executes tasks submitted to
them on the UI thread of the associated UI framework. The returned executor
executes tasks in the same order as the tasks were submitted. If you
don't need to execute them in the same order, consider using the
getSimpleExecutor(boolean) method.
The returned executor is more efficient than an instance of
SwingTaskExecutor.
alwaysExecuteLater - if this argument is true, submitted
tasks are never executed synchronously on the calling thread (i.e.:
if the calling thread is the UI thread, the framework must execute the scheduled
task later). In case this argument is false, tasks submitted from the
UI thread will be executed immediately on the calling thread
(this may not always possible to execute tasks in the order they were submitted).TaskExecutor which executes tasks submitted to
them on the UI thread of the associated UI framework. This method never returns
null.