edu.mit.sketch.system
Class BlackboardSystem
java.lang.Object
|
+--edu.mit.sketch.system.BlackboardSystem
- public class BlackboardSystem
- extends Object
This is the blackboard system, which includes the three major components
of a blackboard architecture:
- The blackboard itself to hold the data
#m_blackboard
- The scheduler
- The Knowledge Sources
The newUserInput method is the entry
point of all user generated items into the system (i.e. strokes
and utterances).
Created: Tue Nov 20 15:52:44 2001
Copyright: Copyright (C) 2001 by MIT. All Rights Reserved.
|
Field Summary |
protected List |
m_newItemQueue
Queue's up the new items as they come into the system. |
m_newItemQueue
protected List m_newItemQueue
- Queue's up the new items as they come into the system.
IMPORTANT: When iterating over this list you must synchronize on
the list itself. e.g.
synchronized(m_newItemQueue) {
Iterator i = m_newItemQueue.iterator();
while (i.hasNext())
foo(i.next());
}
This will ensure that access to the queue is synchronized.
BlackboardSystem
public BlackboardSystem()
setScheduler
public void setScheduler(Scheduler scheduler)
- Set the scheduler object.
newUserInput
public void newUserInput(BBItem item)
- This is the entry point of new items into the system. This
should be called by the UI code when it needs to introduce new
data produced directly by the user. The item will be placed in
a queue until the next convenient time when they can be added to
the actual blackboard.
hasNewUserInput
public boolean hasNewUserInput()
- A funtion that returns whether or not there are new user inputs
that have not yet been added to the blackboard.
addPackage
public void addPackage(RecPackage pkg)
- Add a package complete with shape models and knowledge sources
to the system. The shape models are added to the model
manager and the knowledge sources are added to the knowledge
source manager.
XXX: MO: we probably just want to deal with the ks's here. The
template creator KS will have to deal with getting its shape
models on its own...
getKSManager
public KnowledgeSourceManager getKSManager()
getBlackboard
public Blackboard getBlackboard()
addBlackboardObserver
public void addBlackboardObserver(Observer o)
addSchedulerObserver
public void addSchedulerObserver(Observer o)
toString
public String toString()
- Overrides:
toString in class Object