Class TalkerListener

java.lang.Object
  |
  +--TalkerListener

public class TalkerListener
extends java.lang.Object

The TalkerListener "talks" in a space and registers to "listen" to other spaces.
Observer Design Pattern -- "Gossip" example for COM1204 Summer 2003.

Version:
0.1, 28 June 2003
Author:
Bob Futrelle

Field Summary
 java.lang.String name
           
 Space whereIAmAt
           
 
Constructor Summary
TalkerListener(java.lang.String name, Space whereIAmAt)
          The TalkerListener has a name and a location
 
Method Summary
 void notifyMe(Message msg)
          When a space that the TalkerListener has registered with receives a message, it notifies the TalkerListener using this method.
 void says(java.lang.String said)
          When the TalkerListener speaks, the local space is "notified".
 void transmits(java.lang.String telepathic)
          Tells us the contents of any telepathic message being sent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name

whereIAmAt

public Space whereIAmAt
Constructor Detail

TalkerListener

public TalkerListener(java.lang.String name,
                      Space whereIAmAt)
The TalkerListener has a name and a location

Method Detail

says

public void says(java.lang.String said)
When the TalkerListener speaks, the local space is "notified".


notifyMe

public void notifyMe(Message msg)
When a space that the TalkerListener has registered with receives a message, it notifies the TalkerListener using this method.


transmits

public void transmits(java.lang.String telepathic)
Tells us the contents of any telepathic message being sent.