Class Gossiper
java.lang.Object
|
+--java.util.Observable
|
+--Gossiper
- public class Gossiper
- extends java.util.Observable
Subclass of java.util.Observable that acts as the
"subject" of the Observer design pattern (Gamma et al. 1995)
by using the java class written for this purpose.
Reference:
Gamma, E., Helm, R., Johnson, R., Vlissides, J. 1995. Design Patterns,
Elements of Reusable Object-Oriented Software. Addision-Wesley.
- See Also:
Observable
Constructor Summary |
Gossiper()
Creat a new Gossiper object. |
Method Summary |
void |
tell(java.lang.Object o)
Inform Gossiper object of a change in the
concrete subjects so that it will notify the
designated observers. |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Gossiper
public Gossiper()
- Creat a new Gossiper object.
tell
public void tell(java.lang.Object o)
- Inform Gossiper object of a change in the
concrete subjects so that it will notify the
designated observers.