Triveni

triveni
Class ThreadActivity

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

public abstract class ThreadActivity
extends Activity
implements java.lang.Runnable

An abstraction of thread-based activities, that is, activities with autonomously evolving behavior. Subclasses need to override run and, if any instance variables are added, clone. Subclasses may need to override update only if they want to handle incoming events manually.


Constructor Summary
ThreadActivity()
           
 
Method Summary
abstract  void run()
          The autonomous behavior of this activity.
 
Methods inherited from class triveni.Activity
clearQuiescent, clone, emitEvent, emitEvent, emitEvent, emitInterruptibly, emitInterruptibly, emitInterruptibly, isQuiescent, isStopped, isSuspended, onEmit, onResume, onStart, onStop, onSuspend, setQuiescent, setUpdateHandler, update
 
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

ThreadActivity

public ThreadActivity()
Method Detail

run

public abstract void run()
The autonomous behavior of this activity. Subclasses implementing this method should detect attempts to stop or suspend the activity by catching InterruptedException. Stopping and suspending are distinguished via the inherited methods isStopped and isSuspended.
Specified by:
run in interface java.lang.Runnable

Triveni

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