orc.runtime.sites
Class EvalSite

java.lang.Object
  extended by orc.runtime.values.Value
      extended by orc.runtime.sites.Site
          extended by orc.runtime.sites.EvalSite
All Implemented Interfaces:
Callable
Direct Known Subclasses:
Add, BoolBinopSite, BoundedBuffer, Buffer, Cat, Ceil, Cell, ComparisonSite, Cons, Counter, Datatype, Dictionary, Div, Equal, Exponent, Floor, Inequal, JavaArray, Let, Mod, Mult, Nil, Not, Read, Record, Ref, Semaphore, Sub, SyncChannel, Tag, ThreadSite, UMinus, UUID, Write

public abstract class EvalSite
extends Site

Abstract class for sites with a total and immediate semantics: evaluate the arguments and return a value without blocking and without affecting the Orc engine. Essentially, subclasses of this class represent sites without any special concurrent behavior. Subclasses must implement the method evaluate, which takes an argument list and returns a single value.

Author:
dkitchin

Field Summary
 
Fields inherited from class orc.runtime.values.Value
futureNotReady
 
Constructor Summary
EvalSite()
           
 
Method Summary
 void callSite(Args args, Token caller)
          Must be implemented by subclasses to implement the site behavior
abstract  java.lang.Object evaluate(Args args)
           
 
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
 

Constructor Detail

EvalSite

public EvalSite()
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

evaluate

public abstract java.lang.Object evaluate(Args args)
                                   throws TokenException
Throws:
TokenException