wood burning stoves 2.0*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Is Observer pattern implemented using Multi-Thread in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Is Observer pattern implemented using Multi-Thread in Java" Watch "Is Observer pattern implemented using Multi-Thread in Java" New topic
Author

Is Observer pattern implemented using Multi-Thread in Java

Matt Brown
Ranch Hand

Joined: Jan 26, 2004
Posts: 69
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?


"I just use my muscles as a conversation piece, like someone walking a cheetah down 42nd Street." - Arnold Schwarzenegger
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

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.


OCUP UML fundamental and ITIL foundation
youtube channel
Arnold Reuser
Ranch Hand

Joined: Nov 20, 2003
Posts: 194
You can read the code if you would like to : http://kickjava.com/src/java/util/Observable.java.htm
Nothing related to multi-threaded.
 
Consider Paul's rocket mass heater.
 
subject: Is Observer pattern implemented using Multi-Thread in Java
 
Similar Threads
reassigning new references to previously defined array variables
High-Assurance Design
Good Book for Multi-threading using java
Get adavatage of multiple core hardware
Question about using Multi-threading