IThreadMarshaller Interface
Defines an object that can be used to run tasks on KioWare's UI thread or a KioWare managed background thread. Background thread tasks can optionally be scheduled and repeated as timer tasks.
Methods
Type | Signature |
void |
runOnUiThread(Runnable action)
Submits a Runnable task for execution on the UI thread. |
void |
runOnUiThreadAndWait(Runnable action)
Submits a Runnable task for execution on the UI thread and waits for the task to finish before returning. |
void |
execute(Runnable command)
Executes the given command on a background thread at some time in the future. |
boolean |
isShutdown()
Returns true if the associated addin is being destroyed. |
ScheduledFuture<?> |
schedule(Runnable command, long delay, TimeUnit unit)
Creates and background executes a one-shot action that becomes enabled after the given delay. |
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
Creates and background executes a periodic action that becomes enabled first after the given initial delay, and subsequently with the given period. |
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
Creates and background executes a periodic action that becomes enabled first after the given initial delay, and subsequently with the given delay between the termination of one execution and the commencement of the next. |
Future<?> |
submit(Runnable task)
Submits a Runnable task for background eution and returns a Future representing that task. |
Future<Object> |
submitWithResult(Runnable task, Object result)
Submits a Runnable task for background eution and returns a Future representing that task. |