jcaas
Class EvalScript

java.lang.Object
  extended by jcaas.EvalScript

public class EvalScript
extends java.lang.Object

EvalScript represents the behavior as defined by an evaluation script. It starts a new thread that monitors the BlackBoard and responds to changes.


Method Summary
static EvalScript compile(java.io.File file)
          Compiles the given pointer to a script file and returns an instance of this class which encapsulates the functionality of the given script.
static EvalScript compile(java.io.InputStream input)
          Compiles the given input stream and returns an instance of this class which encapsulates the functionality of the given script.
 EvaluationContext getEvaluationContext()
           
 void init()
           
 void run()
          Runs this script in a new thread to monitor the BlackBoard.
 void stop()
          Signals this class's running thread that it should stop execution.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getEvaluationContext

public EvaluationContext getEvaluationContext()

compile

public static EvalScript compile(java.io.File file)
                          throws java.lang.Exception
Compiles the given pointer to a script file and returns an instance of this class which encapsulates the functionality of the given script.

Parameters:
file - a pointer to a script file.
Returns:
an instance of this class representing the scripts behavior.
Throws:
java.lang.Exception - thrown if there is a parsing error, lexical error, or an I/O error (essentially for anything).

compile

public static EvalScript compile(java.io.InputStream input)
                          throws java.lang.Exception
Compiles the given input stream and returns an instance of this class which encapsulates the functionality of the given script.

Parameters:
input - the input stream to read
Returns:
an instance of this class representing the scripts behavior.
Throws:
java.lang.Exception - thrown if there is a parsing error, lexical error, or an I/O error (essentially for anything).

init

public void init()

run

public void run()
Runs this script in a new thread to monitor the BlackBoard.


stop

public void stop()
Signals this class's running thread that it should stop execution. The time from signalling the thread to stop and the time it actually stops may vary.