Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is Observer pattern implemented using Multi-Thread in Java

 
Matt Brown
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is built in java.util.Observer interface and java.util.Observerable class. It seems it has to be implemented
using multi threads in java. Am I correct?
 
Jan Cumps
Bartender
Posts: 2584
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Matt, Why do you think that?

From the javadoc:
Note that this notification mechanism is has nothing to do with threads and is completely separate from the wait and notify mechanism of class Object.
 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can read the code if you would like to : http://kickjava.com/src/java/util/Observable.java.htm
Nothing related to multi-threaded.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic