Griffon 1.2.0

griffon.core
[Java] Interface ThreadingHandler


public interface ThreadingHandler

Base contract for classes that can perform tasks in different threads following the conventions set by the application.

Authors:
Andres Almiray
Since:
0.9.3


Method Summary
Future execFuture(ExecutorService executorService, Closure closure)

Executes a code block as a Future on an ExecutorService.

Future execFuture(Closure closure)

Executes a code block as a Future on a default ExecutorService.

Future execFuture(ExecutorService executorService, Callable callable)

Executes a code block as a Future on an ExecutorService.

Future execFuture(Callable callable)

Executes a code block as a Future on a default ExecutorService.

void execInsideUIAsync(Runnable runnable)

Executes a code block asynchronously on the UI thread.

void execInsideUISync(Runnable runnable)

Executes a code block synchronously on the UI thread.

void execOutsideUI(Runnable runnable)

Executes a code block outside of the UI thread.

boolean isUIThread()

True if the current thread is the UI thread.

 

Method Detail

execFuture

public Future execFuture(ExecutorService executorService, Closure closure)
Executes a code block as a Future on an ExecutorService.


execFuture

public Future execFuture(Closure closure)
Executes a code block as a Future on a default ExecutorService.


execFuture

public Future execFuture(ExecutorService executorService, Callable callable)
Executes a code block as a Future on an ExecutorService.


execFuture

public Future execFuture(Callable callable)
Executes a code block as a Future on a default ExecutorService.


execInsideUIAsync

public void execInsideUIAsync(Runnable runnable)
Executes a code block asynchronously on the UI thread.


execInsideUISync

public void execInsideUISync(Runnable runnable)
Executes a code block synchronously on the UI thread.


execOutsideUI

public void execOutsideUI(Runnable runnable)
Executes a code block outside of the UI thread.


isUIThread

public boolean isUIThread()
True if the current thread is the UI thread.


 

Groovy Documentation