Triveni

triveni
Class Assertion

java.lang.Object
  |
  +--triveni.Communicator
        |
        +--triveni.Activity
              |
              +--triveni.Assertion

public class Assertion
extends Activity
implements java.awt.ItemSelectable

An item-selectable activity wrapper around a temporal logic assertion. For each LabeledEvent of interest to the temporal logic expression, an ItemEvent indicating the current status of the temporal logic expression is sent to the item listeners of the item-selectable.

See Also:
Expr, ItemSelectable, ItemEvent

Constructor Summary
Assertion(Expr expr)
           
Assertion(Expr expr, java.awt.event.ItemListener il)
           
 
Method Summary
 void addItemListener(java.awt.event.ItemListener il)
           
 java.lang.Object clone()
           
 Expr getExpr()
           
 java.lang.Object[] getSelectedObjects()
           
 void removeItemListener(java.awt.event.ItemListener il)
           
 void update(LabeledEvent evt)
          Handles incoming events.
 
Methods inherited from class triveni.Activity
clearQuiescent, emitEvent, emitEvent, emitEvent, emitInterruptibly, emitInterruptibly, emitInterruptibly, isQuiescent, isStopped, isSuspended, onEmit, onResume, onStart, onStop, onSuspend, setQuiescent, setUpdateHandler
 
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

Assertion

public Assertion(Expr expr)
Parameters:
expr - the temporal logic expression for this assertion.
Throws:
java.lang.IllegalArgumentException - if expr is null.

Assertion

public Assertion(Expr expr,
                 java.awt.event.ItemListener il)
Parameters:
expr - the temporal logic expression for this assertion.
il - the initial ItemListener for this assertion.
Throws:
java.lang.IllegalArgumentException - if expr is null.
Method Detail

addItemListener

public void addItemListener(java.awt.event.ItemListener il)
Specified by:
addItemListener in interface java.awt.ItemSelectable

removeItemListener

public void removeItemListener(java.awt.event.ItemListener il)
Specified by:
removeItemListener in interface java.awt.ItemSelectable

getSelectedObjects

public java.lang.Object[] getSelectedObjects()
Specified by:
getSelectedObjects in interface java.awt.ItemSelectable

update

public void update(LabeledEvent evt)
Description copied from class: Activity
Handles incoming events. This method should be overridden only if incoming events are not handled via a Triveni expression provided using the setUpdateHandler method. This method must not emit response events directly to avoid deadlock; instead, a separate thread should be used.
Overrides:
update in class Activity
Tags copied from class: Activity
Throws:
java.lang.InterruptedException - when the current thread is interrupted.
See Also:
Activity.setUpdateHandler(Expr)

getExpr

public Expr getExpr()

clone

public java.lang.Object clone()
Overrides:
clone in class Activity

Triveni

http://www.cs.luc.edu/triveni/