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

Field Summary
 
Fields inherited from class orc.runtime.values.Value
futureNotReady
 
Method Summary
 void callSite(Args args, Token caller)
          Must be implemented by subclasses to implement the site behavior
 java.lang.Object getProxiedObject()
           
static Callable proxyFor(java.lang.Object instance)
           
 
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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

proxyFor

public static Callable proxyFor(java.lang.Object instance)

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

getProxiedObject

public java.lang.Object getProxiedObject()