| Author |
ObserverPattern
|
Ramesh Kumar Swarnkar
Ranch Hand
Joined: Sep 15, 2003
Posts: 83
|
|
Hi, I need to look some very simple code example for ObserverPattern. can any one give some example for beginner level code. regards, Ramesh
|
 |
Nitesh Kant
Bartender
Joined: Feb 25, 2007
Posts: 1638
|
|
Have a look at this By the way, jdk also provides an implementation for this pattern, here are the related classes: Observable Observer
|
apigee, a better way to API!
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Ah yes, java.util.Observable... It can be used as an example on how to implement this yourself, but I find the class highly unusable - if you want to use it, your classes must become subclasses of Observable. It should have been an interface instead, with a default implementation like AbstractObservable or DefaultObservable.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: ObserverPattern
|
|
|