Triveni

triveni
Class Communicator

java.lang.Object
  |
  +--triveni.Communicator
Direct Known Subclasses:
Activity, Expr

public abstract class Communicator
extends java.lang.Object
implements java.lang.Cloneable, LabeledListener

The class Communicator provides common capabilities for the Triveni classes Activity and Expr. This class handles renaming, relevant labels of incoming events, and external event listeners.

See Also:
Activity, Expr, LabeledEvent, LabeledListener

Constructor Summary
Communicator()
           
 
Method Summary
 void addLabeledListener(LabeledListener l)
          Adds an external listener to this communicator.
protected  void addRelevantLabel(java.lang.Object label)
          Adds a label to the incoming event labels this communicator is interested in.
protected  void addRelevantLabels(com.sun.java.util.collections.List labels)
          Adds labels to the incoming event labels this communicator is interested in.
 java.lang.Object clone()
           
protected  void fireEvent(LabeledEvent e)
          Fires an event to all external listeners.
protected  com.sun.java.util.collections.List getRelevantLabels()
          The incoming event labels this communicator is interested in.
 void removeLabeledListener(LabeledListener l)
          Removes an external listener from this communicator.
protected  void removeRelevantLabel(java.lang.Object label)
          Removes a relevant incoming event label.
protected  void setRelevantLabels(com.sun.java.util.collections.List labels)
          Sets the incoming event labels this communicator is interested in.
protected  void setRelevantLabels(java.lang.Object[] labels)
          Sets the incoming event labels this communicator is interested in.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Communicator

public Communicator()
Method Detail

getRelevantLabels

protected final com.sun.java.util.collections.List getRelevantLabels()
The incoming event labels this communicator is interested in.

setRelevantLabels

protected final void setRelevantLabels(com.sun.java.util.collections.List labels)
Sets the incoming event labels this communicator is interested in.

addRelevantLabel

protected final void addRelevantLabel(java.lang.Object label)
Adds a label to the incoming event labels this communicator is interested in.

addRelevantLabels

protected final void addRelevantLabels(com.sun.java.util.collections.List labels)
Adds labels to the incoming event labels this communicator is interested in.

setRelevantLabels

protected final void setRelevantLabels(java.lang.Object[] labels)
Sets the incoming event labels this communicator is interested in.

removeRelevantLabel

protected final void removeRelevantLabel(java.lang.Object label)
Removes a relevant incoming event label.

addLabeledListener

public final void addLabeledListener(LabeledListener l)
Adds an external listener to this communicator.

removeLabeledListener

public final void removeLabeledListener(LabeledListener l)
Removes an external listener from this communicator.

fireEvent

protected final void fireEvent(LabeledEvent e)
                        throws java.lang.InterruptedException
Fires an event to all external listeners.

clone

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

Triveni

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