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.java.MethodProxy
All Implemented Interfaces:
Callable

public class MethodProxy
extends Site

Allow a Java method to be used as an Orc site.

MAGIC: pausible methods are run in a Kilim task. We actually go to some lengths to avoid running non-pausable methods in a Kilim task to ensure that if this site is wrapped by ThreadSite, the method will actually run in its own thread and not in the Kilim thread.

Author:
quark, dkitchin

Field Summary
 
Fields inherited from class orc.runtime.values.Value
futureNotReady
 
Constructor Summary
MethodProxy(java.lang.Object instance, MethodHandle delegate)
           
 
Method Summary
 void callSite(Args args, Token caller)
          Must be implemented by subclasses to implement the site behavior
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 
Methods inherited from class orc.runtime.sites.Site
accept, createCall, type
 
Methods inherited from class orc.runtime.values.Value
forceArg, forceCall, signal, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodProxy

public MethodProxy(java.lang.Object instance,
                   MethodHandle delegate)
Method Detail

callSite

public void callSite(Args args,
                     Token caller)
              throws TokenException
Description copied from class: Site
Must be implemented by subclasses to implement the site behavior

Specified by:
callSite in class Site
Parameters:
args - list of argument values
caller - where the result should be sent
Throws:
TokenException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object