public class RunnableClosure<T>
extends java.lang.Object
implements java.util.concurrent.Callable<T>, java.lang.Runnable
Constructor and Description |
---|
RunnableClosure(Procedure action) |
RunnableClosure(Procedure action,
gnu.kawa.io.InPort in,
gnu.kawa.io.OutPort out,
gnu.kawa.io.OutPort err) |
Modifier and Type | Method and Description |
---|---|
T |
call() |
CallContext |
getCallContext()
Get the CallContext we use for this Thread.
|
java.lang.String |
getName() |
java.lang.Object |
getResult()
Get the result of running this
Runnable . |
void |
run() |
void |
setName(java.lang.String name) |
java.lang.String |
toString() |
public RunnableClosure(Procedure action)
public RunnableClosure(Procedure action, gnu.kawa.io.InPort in, gnu.kawa.io.OutPort out, gnu.kawa.io.OutPort err)
public java.lang.String getName()
public void setName(java.lang.String name)
public final CallContext getCallContext()
public void run()
run
in interface java.lang.Runnable
public java.lang.Object getResult() throws java.lang.Throwable
Runnable
.
The result is a value or a thrown exception.
Should be called after {#code run} finishes.java.lang.Throwable
public T call() throws java.lang.Exception
call
in interface java.util.concurrent.Callable<T>
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object