orc.runtime.sites.java
Class MethodProxy

java.lang.Object
  extended by orc.runtime.values.Value
      extended by orc.runtime.sites.Site
          extended by orc.runtime.sites.SimpleSite
              extended by orc.runtime.sites.java.MethodProxy
All Implemented Interfaces:
Callable, Future

public class MethodProxy
extends SimpleSite

This extends SimpleSite so that methods can use orc.runtime.Continuation to take advantage of Orc's cooperative threading, if desired.

Author:
dkitchin, quark

Constructor Summary
MethodProxy(java.util.List<java.lang.reflect.Method> m, java.lang.Object self, java.lang.String name)
           
 
Method Summary
 Value evaluate(Args args)
          If this method calls Continuation.suspend(), its return value will be ignored and the engine will expect the method to resume or kill the continuation when ready.
 
Methods inherited from class orc.runtime.sites.SimpleSite
callSite
 
Methods inherited from class orc.runtime.sites.Site
accept, createCall
 
Methods inherited from class orc.runtime.values.Value
forceArg, forceCall, head, isCons, isNil, isNone, isSome, signal, tail, untag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodProxy

public MethodProxy(java.util.List<java.lang.reflect.Method> m,
                   java.lang.Object self,
                   java.lang.String name)
Method Detail

evaluate

public Value evaluate(Args args)
               throws TokenException
Description copied from class: SimpleSite
If this method calls Continuation.suspend(), its return value will be ignored and the engine will expect the method to resume or kill the continuation when ready. Otherwise, the site is assumed to be total and immediate and the return value will be used as the published value of the call.

Specified by:
evaluate in class SimpleSite
Throws:
TokenException