Trull

edu.luc.cs.trull.demo.test
Class ConsoleTester

java.lang.Object
  extended by edu.luc.cs.trull.EmptyComponent
      extended by edu.luc.cs.trull.TerminatingComponent
          extended by edu.luc.cs.trull.AbstractComponent
              extended by edu.luc.cs.trull.EmitComponent
                  extended by edu.luc.cs.trull.demo.test.ConsoleTester
All Implemented Interfaces:
Component, PropertyChangeSource, Startable, Suspendable, Terminating, java.beans.PropertyChangeListener, java.util.EventListener

public class ConsoleTester
extends EmitComponent

A tester for Trull components, which reads event labels from the console and passes it to the component.

Example:

 new Composite(new ConsoleTester(), new MyCounter(...))
 


Field Summary
static java.lang.String STOP
           
private  java.lang.Thread thread
           
 
Constructor Summary
ConsoleTester()
           
 
Method Summary
 void propertyChange(java.beans.PropertyChangeEvent event)
           
 void start(java.beans.PropertyChangeEvent event)
          Starts this startable component.
 void stop()
          Stops this startable component.
 
Methods inherited from class edu.luc.cs.trull.EmitComponent
eventEmitter, eventEmitterCached, eventEmitterUncached, resume, scheduleEvent, scheduleEvent, scheduleEvent, suspend
 
Methods inherited from class edu.luc.cs.trull.AbstractComponent
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getExternalListeners, getPropertyChangeListeners, removePropertyChangeListener
 
Methods inherited from class edu.luc.cs.trull.TerminatingComponent
fireTermination, getParent, getTermEvent, scheduleTermination, setTerminationListener
 
Methods inherited from class edu.luc.cs.trull.EmptyComponent
getTerminationListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STOP

public static final java.lang.String STOP
See Also:
Constant Field Values

thread

private java.lang.Thread thread
Constructor Detail

ConsoleTester

public ConsoleTester()
Method Detail

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class EmptyComponent

start

public void start(java.beans.PropertyChangeEvent event)
Description copied from interface: Startable
Starts this startable component.

Specified by:
start in interface Startable
Overrides:
start in class EmitComponent
Parameters:
event - the event that triggered the invocation of this method. May be null.

stop

public void stop()
Description copied from interface: Startable
Stops this startable component.

Specified by:
stop in interface Startable
Overrides:
stop in class EmitComponent

Trull

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