org.eidola.kernel
Class Engine
java.lang.Object
|
+--org.eidola.kernel.Engine
- public class Engine
- extends Object
Responsible for the large-scale organization of containers.
This class is just a sketch until it becomes clearer exactly what
sort of "large-scale organization" needs to happen, and which
responsibilities fall on the UI vs. the kernel.
Containers take an engine as a constructor argument, and add
themselves on creation. This will almost certainly change.
Currently, the Engine does two things:
- It runs a flock of threads running a
Compiler
.
- It creates a queue for propagating events between containers.
Open questions include:
- Should the engine provide an interface for tracking all
containers created? Should it provide a global name-based lookup?
- Is it wise to have containers add themselves on creation?
There may well be situations where we want to futz with a new
container without having somebody trying to compile it.
- Is it wise to have a default static instance that everybody
shares? It might be better to allow multiple engines in the same
JVM for doing things like developing/debugging Eidola in Eidola
(not that this will be a question in the immediate future).
- Is it better to make Namespace responsible for tracking
containers' names, attaching them to an engine, and so forth?
This might be the way to go, but the requirements aren't clear yet.
- Version:
- [Development version]
- Author:
- Paul Cantrell
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static Engine getInstance()
start
public void start()
add
public void add(Container container)
remove
public void remove(Container container)
getPropagatorQ
public EventQueue getPropagatorQ()