orc.runtime.sites.java
Class ObjectProxy

java.lang.Object
  extended by orc.runtime.values.Value
      extended by orc.runtime.sites.Site
          extended by orc.runtime.sites.java.ObjectProxy
All Implemented Interfaces:
Callable

public class ObjectProxy
extends Site

A Java object being used as an Orc Site. This allows you to get a reference to methods on the object using dot notation (like a DotSite).

Methods are assumed to be non-blocking (although they may use kilim for cooperative threading if desired). For objects with blocking methods, use ThreadedObjectProxy.

Author:
dkitchin

Nested Class Summary
static class ObjectProxy.Delegate
          Handle for a method (known in the .NET world as a delegate).
static class ObjectProxy.DelegateCache
          Find and cache delegates by name.
 
Field Summary
 
Fields inherited from class orc.runtime.values.Value
futureNotReady
 
Constructor Summary
ObjectProxy(java.lang.Object inst)
           
 
Method Summary
 void callSite(Args args, Token caller)
          Must be implemented by subclasses to implement the site behavior
 
Methods inherited from class orc.runtime.sites.Site
accept, createCall
 
Methods inherited from class orc.runtime.values.Value
forceArg, forceCall, isNone, isSome, signal, untag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectProxy

public ObjectProxy(java.lang.Object inst)
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