Package gnu.mapping
Class RunnableClosure<T>
- java.lang.Object
-
- gnu.mapping.RunnableClosure<T>
-
- All Implemented Interfaces:
java.lang.Runnable,java.util.concurrent.Callable<T>
public class RunnableClosure<T> extends java.lang.Object implements java.util.concurrent.Callable<T>, java.lang.Runnable
-
-
Constructor Summary
Constructors Constructor Description RunnableClosure(Procedure action)RunnableClosure(Procedure action, gnu.kawa.io.InPort in, gnu.kawa.io.OutPort out, gnu.kawa.io.OutPort err)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tcall()CallContextgetCallContext()Get the CallContext we use for this Thread.java.lang.StringgetName()java.lang.ObjectgetResult()Get the result of running thisRunnable.voidrun()voidsetName(java.lang.String name)java.lang.StringtoString()
-
-
-
Method Detail
-
getName
public java.lang.String getName()
-
setName
public void setName(java.lang.String name)
-
getCallContext
public final CallContext getCallContext()
Get the CallContext we use for this Thread.
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
getResult
public java.lang.Object getResult() throws java.lang.ThrowableGet the result of running thisRunnable. The result is a value or a thrown exception. Should be called after {#code run} finishes.- Throws:
java.lang.Throwable
-
call
public T call() throws java.lang.Exception
- Specified by:
callin interfacejava.util.concurrent.Callable<T>- Throws:
java.lang.Exception
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-