public class ExecutionUtilities
extends java.lang.Object
executeLater(IModel, Runnable)
and
executeLater(IModel, Runnable, Runnable)
both wrap the runnables in
ITimedEvent
s that are posted onto the IModel
's
TimedEventQueue
. executeNow(IModel, Runnable)
uses the
ModelCycleExecutor
to fire the runnable
ModelCycleExecutor.When#ASAP
.Constructor and Description |
---|
ExecutionUtilities() |
Modifier and Type | Method and Description |
---|---|
static java.util.concurrent.Future<java.lang.Boolean> |
executeLater(IModel model,
java.lang.Runnable onFire) |
static java.util.concurrent.Future<java.lang.Boolean> |
executeLater(IModel model,
java.lang.Runnable onFire,
java.lang.Runnable onAbort)
will execute the runnable on the model thread at the earliest possible
moment.
|
static java.util.concurrent.Future<java.lang.Boolean> |
executeNow(IModel model,
java.lang.Runnable onFire)
post this runnable to execute after the current cycle finishes
|
public static java.util.concurrent.Future<java.lang.Boolean> executeLater(IModel model, java.lang.Runnable onFire, java.lang.Runnable onAbort) throws java.lang.IllegalStateException
ITimedEvent
s to handle
the executionmodel
- runnable
- java.lang.IllegalStateException
- if the model is not runningpublic static java.util.concurrent.Future<java.lang.Boolean> executeNow(IModel model, java.lang.Runnable onFire)
model
- onFire
- public static java.util.concurrent.Future<java.lang.Boolean> executeLater(IModel model, java.lang.Runnable onFire) throws java.lang.IllegalStateException
java.lang.IllegalStateException