net.sourceforge.groboutils.util.classes.v1
Class SPISingletonStore
java.lang.Object
net.sourceforge.groboutils.util.classes.v1.AbstractMultipleStore
net.sourceforge.groboutils.util.classes.v1.SPISingletonStore
- public class SPISingletonStore
- extends AbstractMultipleStore
Aids pluggable factories and related classes by being a central repository
for storing SPI singletons, and creating means to load and change the
singletons.
This uses the same pattern as the SingletonStore class, but this
one allows for multiple singleton instances, and loads them from the
SPILoader class.
- Since:
- June 28, 2002
- Version:
- $Date: 2003/02/10 22:52:36 $
- Author:
- Matt Albrecht groboclown@users.sourceforge.net
- See Also:
SingletonStore
Method Summary |
protected void |
addDefaultSingletons()
Adds the default inner singletons, which is an implementation
specific method. |
void |
addSPI(java.lang.ClassLoader cl)
Add a set of SPIs from the given class loader. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SPISingletonStore
public SPISingletonStore(java.lang.Class instanceOf,
AbstractMultipleStore.AllowMultiplesAction ama)
- Constructor specifying all the parameters for using a singleton in this
framework.
- Parameters:
instanceOf
- singletons must be of this class. This is also used
to load the SPI classes.ama
- true if this store should allow
multiple instances of the exact same class, or false
if it should prevent multiple instances sharing the exact
same class. This helps to enforce the idea of 'singleton'.
addDefaultSingletons
protected void addDefaultSingletons()
- Adds the default inner singletons, which is an implementation
specific method.
- Specified by:
addDefaultSingletons
in class AbstractMultipleStore
addSPI
public void addSPI(java.lang.ClassLoader cl)
throws java.io.IOException
- Add a set of SPIs from the given class loader.
- Throws:
java.io.IOException
Copyright © 2001-2003 by The GroboUtils Project