public abstract class UiSynchronizer
extends java.lang.Object
Constructor and Description |
---|
UiSynchronizer() |
Modifier and Type | Method and Description |
---|---|
abstract void |
asyncExec(java.lang.Runnable runnable)
Causes the
run() method of the runnable to be invoked by
the user-interface thread at the next reasonable opportunity; the caller
of this method continues to run in parallel, and is not notified when the
runnable has completed. |
static UiSynchronizer |
getDefault()
Returns a default instance of the synchronizer, or
null
if it is not available at this time (e.g., when running headless). |
abstract java.lang.Thread |
getThread()
Returns the user-interface thread the synchronizer uses to execute
runnables.
|
abstract void |
syncExec(java.lang.Runnable runnable)
Causes the
run() method of the runnable to be invoked by
the user-interface thread at the next reasonable opportunity; the thread
which calls this method is suspended until the runnable completes. |
public static UiSynchronizer getDefault()
null
if it is not available at this time (e.g., when running headless).public abstract java.lang.Thread getThread()
null
)java.lang.IllegalStateException
- if the synchronizer can no longer be
accessed (e.g., the underlying display has been disposed)public abstract void asyncExec(java.lang.Runnable runnable)
run()
method of the runnable to be invoked by
the user-interface thread at the next reasonable opportunity; the caller
of this method continues to run in parallel, and is not notified when the
runnable has completed.runnable
- code to run on the user-interface thread
(not null
)java.lang.IllegalStateException
- if the synchronizer can no longer be
accessed (e.g., the underlying display has been disposed)public abstract void syncExec(java.lang.Runnable runnable) throws java.util.concurrent.ExecutionException
run()
method of the runnable to be invoked by
the user-interface thread at the next reasonable opportunity; the thread
which calls this method is suspended until the runnable completes.runnable
- code to run on the user-interface thread
(not null
)java.lang.IllegalStateException
- if the synchronizer can no longer be
accessed (e.g., the underlying display has been disposed)java.util.concurrent.ExecutionException
- if an exception occurred when executing
the runnableCopyright (c) 2014, 2019 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0