|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.omegahat.Environment.Interpreter.EvaluatorManager
This class is intended to manage multiple evaluators in the cases where they are
TaskQueue objects, so that
synchronization is structured.
See also TaskManagement
It provides methods for
Options controlling
evaluators,
| Field Summary | |
protected java.lang.String[] |
commandLineArgs
The command line arguments passed to the object, usually when it is created and come from the omegahat script. |
static java.lang.String |
EvaluatorClassName
|
protected java.util.Vector |
evaluators
The ordered collection of Evaluator objects
which are under the "management" of this
object. |
protected java.util.Hashtable |
evaluatorThreads
|
protected FileLocatorInt |
fileLocator
|
java.lang.String |
FinalScriptProperty
|
java.lang.String |
OmegaScriptSearchPath
|
protected Options |
options
|
| Constructor Summary | |
EvaluatorManager()
Create an instance of this class, registering in the "global" variable accessible from System.Globals#manager() |
|
EvaluatorManager(ManagedEvaluatorInt evaluator)
Create a manager object to manage the specified object, usually an Evaluator,
registering this as the manager for that object
and also storing this in the global variable
System.Globals#manager(). |
|
EvaluatorManager(Options opts)
Create a manager with the specified collection of Options controlling the different
characteristics of the manager and also the
Evaluator objects that are created
by this manager. |
|
EvaluatorManager(java.lang.String[] args)
Create an instance of this class, caching the command line arguments parameterizing its options, etc. |
|
| Method Summary | |
ManagedEvaluatorInt |
addEvaluator(ManagedEvaluatorInt obj)
|
java.lang.String[] |
commandLine()
Return the current values for the command line arguments stored in this object. |
java.lang.String[] |
commandLine(java.lang.String[] args)
Set the command line arguments parameterizing the behaviour of this object. |
Evaluator |
createEvaluator(Evaluator src)
|
Evaluator |
evaluator()
Obtain the default evaluator, creating one if there is none already registered with this manager. |
Evaluator |
evaluator(boolean force)
Return the default evaluator managed by this object and "available" to other objects when they require an Evaluator to evaluate some expressions, etc. |
Evaluator |
evaluator(Evaluator src)
|
Evaluator |
evaluator(java.lang.String className)
Create a new evaluator of the specified class, identfied by a completely qualified class name, in contrast to the usual class lookup rules of the evaluator. |
Evaluator |
evaluator(java.lang.String className,
Evaluator parent)
|
Evaluator |
evaluator(java.lang.Thread thread)
|
java.util.Vector |
evaluators()
Return the reference to the list of Evaluator (or specifically,
ManagedEvaluatorInt) objects
being managed by this object. |
java.util.Hashtable |
evaluatorThreads()
|
void |
exit(Evaluator src)
|
void |
exit(Evaluator src,
int val)
|
void |
exit(int val)
|
FileLocatorInt |
fileLocator()
|
FileLocatorInt |
fileLocator(FileLocatorInt locator)
|
java.lang.Object |
findFile(java.lang.String str)
|
int |
manager(Evaluator ev)
|
Options |
options()
|
Options |
options(Options opts)
|
boolean |
q(Evaluator src)
|
boolean |
q(Evaluator src,
boolean force)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static java.lang.String EvaluatorClassName
public java.lang.String FinalScriptProperty
public final java.lang.String OmegaScriptSearchPath
protected java.lang.String[] commandLineArgs
omegahat script.protected java.util.Vector evaluators
Evaluator objects
which are under the "management" of this
object.protected java.util.Hashtable evaluatorThreads
protected Options options
protected FileLocatorInt fileLocator
| Constructor Detail |
public EvaluatorManager()
System.Globals#manager()public EvaluatorManager(java.lang.String[] args)
System.Globals#manager()public EvaluatorManager(ManagedEvaluatorInt evaluator)
Evaluator,
registering this as the manager for that object
and also storing this in the global variable
System.Globals#manager().
This is called to create a manager after
an Evaluator has been created.public EvaluatorManager(Options opts)
Options controlling the different
characteristics of the manager and also the
Evaluator objects that are created
by this manager.| Method Detail |
public java.lang.String[] commandLine()
public java.lang.String[] commandLine(java.lang.String[] args)
EvaluatorManager(String[])public java.util.Vector evaluators()
Evaluator (or specifically,
ManagedEvaluatorInt) objects
being managed by this object.public java.util.Hashtable evaluatorThreads()
public Evaluator evaluator(boolean force)
throws java.lang.ClassNotFoundException
Evaluator to evaluate some expressions, etc.
If no evaluator has been registered with this manager, this
method can optionally instantiate one.force - if true, this
creates a new evaluator if there is none available.
It does so using the evaluator(Evaluator)
method.
public Evaluator evaluator()
throws java.lang.ClassNotFoundException
public Evaluator evaluator(java.lang.String className)
throws java.lang.ClassNotFoundException,
java.lang.Throwable
Evaluator.
See evaluator(java.lang.String,Evaluator).className - the fully qualified name of the specific
class to instantiate which implements
Evaluator
public Evaluator evaluator(java.lang.String className,
Evaluator parent)
throws java.lang.ClassNotFoundException,
java.lang.Throwable
public Evaluator evaluator(Evaluator src)
throws java.lang.ClassNotFoundException
public Evaluator createEvaluator(Evaluator src)
public ManagedEvaluatorInt addEvaluator(ManagedEvaluatorInt obj)
public boolean q(Evaluator src)
public boolean q(Evaluator src,
boolean force)
public int manager(Evaluator ev)
public Evaluator evaluator(java.lang.Thread thread)
public void exit(Evaluator src)
public void exit(int val)
public void exit(Evaluator src,
int val)
public Options options()
public Options options(Options opts)
public java.lang.Object findFile(java.lang.String str)
public FileLocatorInt fileLocator()
public FileLocatorInt fileLocator(FileLocatorInt locator)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||