|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use SingletonRegistry | |
---|---|
dk.rode.thesis.singleton | Implementations and examples of the Singleton design pattern [Gamma95, p.127]. |
Uses of SingletonRegistry in dk.rode.thesis.singleton |
---|
Classes in dk.rode.thesis.singleton that implement SingletonRegistry | |
---|---|
class |
LoadableSingletonRegistry<T>
A loadable singleton registry is a registry that offers the same functionality as StatefullSingletonRegistry , but
also allows loading of the actual singleton classes if not already
loaded using the LoadableSingletonRegistry.getInstance(String) method. |
class |
StatefullSingletonRegistry<T>
A statefull singleton registry stores a reference to each acquired singleton instance using a live daemon thread: as long as the registry is not garbage collected, the singleton instances acquired through it will not be garbage collected either. |
class |
StatelessSingletonRegistry<T>
A stateless singleton registry is a registry with no internal state that allows any type annotated correctly with the Singleton annotation to be fetched, and
possibly created, using the StatelessSingletonRegistry.getInstance(Class)
method. |
Fields in dk.rode.thesis.singleton declared as SingletonRegistry | |
---|---|
private SingletonRegistry<? super T> |
StatefullSingletonRegistry.registry
The actual registry used to acquire the singleton types supplied at construction time. |
Methods in dk.rode.thesis.singleton with parameters of type SingletonRegistry | ||
---|---|---|
private
|
Main.getSingleton(Log out,
SingletonRegistry<T> registry,
Class<S> type,
S singleton)
Tests the singleton object supplied as singleton against the
return instance from registry when looked up using type . |
Constructors in dk.rode.thesis.singleton with parameters of type SingletonRegistry | |
---|---|
LoadableSingletonRegistry(ClassLoader classLoader,
SingletonRegistry<T> registry)
Constructor. |
|
StatefullSingletonRegistry(SingletonRegistry<? super T> registry)
Constructor. |
|
Gunni Rode / rode.dk | ||||||||
PREV NEXT | FRAMES NO FRAMES |