The Observer Design Pattern is among the most useful for object-oriented
software design. The JDK itself makes heavy use of a variant of this pattern
in the 1.1 AWT event delegation model. The JDK also provides a reusable
embodiment of the pattern in the form of the java.util.Observer interface and
the java.util.Observable class. If you've done much serious Java programming
you've more than likely had occasion to use these classes.
The idea of the pattern is to model a one-to-many dependency without tightly
coupling the observed object with its many observers. When the observed
object changes in some interesting way it can automatically notify all of its
observers without knowing them directly. For more on this pattern, see Qusay
Mahmoud's article, "Implementing Design P... (more)
Implementation of a fixed size pool of Objects in a distributed application
must consider problems caused by the unpredictable nature of remote
connections. An implementation is presented here for Java's Remote Method
Invocation, which takes advantage of the Distributed Garbage Collector to
solve those problems.
You're probably familiar with the mechanism of a fixed size pool of Objects, ... (more)