R - the type of the result/returnpublic abstract class ReturningRunnable<R>
extends java.lang.Object
| Constructor and Description |
|---|
ReturningRunnable() |
ReturningRunnable(java.lang.String operationDescription) |
| Modifier and Type | Method and Description |
|---|---|
void |
async(Callback<R> callback)
Runs the code inside
run() on a new Thread and returns immediately. |
R |
await()
Runs the code inside
run() synchronously on the same thread this method is called. |
abstract R |
run() |
public ReturningRunnable()
public ReturningRunnable(java.lang.String operationDescription)
public abstract R run() throws java.lang.Exception
java.lang.Exceptionpublic R await() throws java.lang.Exception
run() synchronously on the same thread this method is called.run() methodjava.lang.Exception - error from the operation