|
Triveni | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--triveni.Communicator
|
+--triveni.Expr
The Expr class is the abstract superclass of all
Triveni expression classes. A Triveni expression is a software
component that has event-driven reactive behavior. A Triveni
expression may or may not have a graphical user interface or
any other subcomponents.
A class for a custom Triveni expression is usually declared
by subclassing from Expr and providing any
necessary instance variables for the object-oriented aspects
of the expression. The event-driven aspects of the expression
are then provided, usually in the constructor, by using the
method become with a Triveni expression that
describes the desired behavior. Code that interacts with
the object-oriented aspects of a Triveni expression may be
embedded in the event-driven behavior in the form of actions,
emitters, predicates, and valuators.
Users should override clone if cloning capabilities are
required.
Activity,
Action,
Emitter,
LabeledEvent,
Predicate,
Valuator| Constructor Summary | |
Expr()
|
|
| Method Summary | |
protected void |
addNewActExpressions(Expr e)
Reserved for future use. |
protected void |
become(Expr e)
Assume the event-driven behavior of the given expression. |
java.lang.Object |
clone()
|
void |
printFSM()
Reserved for debugging purposes. |
void |
setOnQuiescence(java.lang.Runnable onQuiescence)
This method is used to provide code in the form of a Runnable to be executed each time this expression
becomes quiescent after the occurrence of an event. |
void |
setTracer(LabeledListener v)
Sets a listener to trace all non-internal events occuring in this Triveni expression. |
void |
spawn()
Starts the Triveni expression in a non-blocking form in a new thread. |
void |
start()
Starts the Triveni expression with a default initial event and blocks until the expression terminates. |
protected void |
start(LabeledEvent evt)
Starts the Triveni expression with the given initial event and blocks until the expression terminates. |
void |
update(LabeledEvent evt)
Invoked when an event occurs. |
| Methods inherited from class triveni.Communicator |
addLabeledListener,
addRelevantLabel,
addRelevantLabels,
fireEvent,
getRelevantLabels,
removeLabeledListener,
removeRelevantLabel,
setRelevantLabels,
setRelevantLabels |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public Expr()
| Method Detail |
public final void setOnQuiescence(java.lang.Runnable onQuiescence)
Runnable to be executed each time this expression
becomes quiescent after the occurrence of an event.
To turn off quiescence detection, this method is invoked
with a null argument.onQuiescence - the Runnable to be invoked on each quiescence.protected void become(Expr e)
protected void addNewActExpressions(Expr e)
public final void printFSM()
public final void start()
throws java.lang.InterruptedException
public final void spawn()
public void update(LabeledEvent evt)
throws java.lang.InterruptedException
protected final void start(LabeledEvent evt)
throws java.lang.InterruptedException
evt - the initial event.public void setTracer(LabeledListener v)
null
listener is used.public java.lang.Object clone()
|
Triveni | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||