Class Space
java.lang.Object
|
+--Space
- public class Space
- extends java.lang.Object
The Space class where messages are sent and which notifies registered listeners.
Observer Design Pattern -- "Gossip" example for COM1204 Summer 2003.
- Version:
- 0.1, 28 June 2003
- Author:
- Bob Futrelle
Constructor Summary |
Space(java.lang.String name)
|
Method Summary |
void |
iCanHearThere(TalkerListener listener)
Allows a TalkerListener to be placed on the registered listeners list. |
void |
notifySpace(Message msg)
When a TalkerListener says something, its local space is informed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
public java.lang.String name
registeredListeners
public java.util.ArrayList registeredListeners
Space
public Space(java.lang.String name)
iCanHearThere
public void iCanHearThere(TalkerListener listener)
- Allows a TalkerListener to be placed on the registered listeners list.
notifySpace
public void notifySpace(Message msg)
- When a TalkerListener says something, its local space is informed.