public interface UISynchronize
Modifier and Type | Interface and Description |
---|---|
static class |
UISynchronize.BlockCondition<T>
A block condition
|
Modifier and Type | Method and Description |
---|---|
<V> java.util.concurrent.Future<V> |
asyncExec(java.util.concurrent.Callable<V> callable)
Schedules the runnable on the UI-Thread for execution and returns
immediately
|
void |
asyncExec(java.lang.Runnable runnable)
Schedules the runnable on the UI-Thread for execution and returns
immediately
|
<T> T |
block(@NonNull UISynchronize.BlockCondition<T> blockCondition)
Block the UI-Thread in a way that events are still processed until the
given condition is released
|
<T> java.util.concurrent.CompletableFuture<T> |
scheduleExecution(long delay,
java.util.concurrent.Callable<T> runnable)
Schedule the execution of the callable
|
Subscription |
scheduleExecution(long delay,
java.lang.Runnable runnable)
Schedule the execution of the runnable
|
<V> V |
syncExec(java.util.concurrent.Callable<V> callable,
V defaultValue)
Sync with the ui thread und provide a result when done
|
void |
syncExec(java.lang.Runnable runnable)
Executes the runnable on the UI-Thread and blocks until the runnable is
finished
|
<V> V syncExec(java.util.concurrent.Callable<V> callable, V defaultValue)
callable
- the callable to executedefaultValue
- a default value to returnvoid syncExec(java.lang.Runnable runnable)
runnable
- the runnable to execute<V> java.util.concurrent.Future<V> asyncExec(java.util.concurrent.Callable<V> callable)
callable
- the callable to executevoid asyncExec(java.lang.Runnable runnable)
runnable
- the runnable to execute<T> T block(@NonNull UISynchronize.BlockCondition<T> blockCondition)
blockCondition
- the conditionSubscription scheduleExecution(long delay, java.lang.Runnable runnable)
delay
- the delayrunnable
- the runnable to execute<T> java.util.concurrent.CompletableFuture<T> scheduleExecution(long delay, java.util.concurrent.Callable<T> runnable)
delay
- the delayrunnable
- the callable to execute