|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorc.runtime.Continuation
public class Continuation
A one-shot continuation which a site can use to resume a computation with a suspended value. Exists mainly to provide Java sites with a restricted interface to tokens to prevent them from doing anything bad.
Constructor Summary | |
---|---|
Continuation(Token token)
|
Method Summary | |
---|---|
void |
error(java.lang.Exception e)
Signal an error. |
void |
error(TokenException e)
|
void |
kill()
Kill the continuation (indicate it will never return). |
void |
resume(Value value)
Return a value from a site call. |
static Continuation |
suspend()
Get a continuation which can be used by a site to return a value to the Orc engine. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Continuation(Token token)
Method Detail |
---|
public static Continuation suspend()
Note that this does not block or perform any control flow; it's up to the caller to return normally after calling this method (though the return value will be ignored).
public void kill()
public void error(TokenException e)
public void error(java.lang.Exception e)
public void resume(Value value)
Note that this does not perform any control flow; the actual resumption will occur in a separate thread, so it's up to the caller what to do after resuming.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |