stomp.util
Class AbstractFactory

java.lang.Object
  |
  +--stomp.util.AbstractFactory
Direct Known Subclasses:
JDOFactory, JNDIProperties, ServiceFactory, TransactionFactory, WrapperFactory

public class AbstractFactory
extends java.lang.Object

base class for factories which support runtime class hierarchy definitions. That is, the exact classes which handle any particular function call are specified in runtime prefs, and instantiated dynamically at runtime. note that, although there is no way to enforce this in java, AbstractFactory requires that all of its subclasses have a no-args constructor. Failure to implement this method will result in RuntimeExceptions from the singleton method.

Author:
Eric Lindauer

Constructor Summary
AbstractFactory()
           
 
Method Summary
static java.lang.Object singletonFactory(java.lang.String prefName)
          looks up the factory inheritance hierarchy specified by the given pref and instantiates the needed factories.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFactory

public AbstractFactory()
Method Detail

singletonFactory

public static java.lang.Object singletonFactory(java.lang.String prefName)
looks up the factory inheritance hierarchy specified by the given pref and instantiates the needed factories. This pref should be an array of class names, in the opposite order that calls made on the factory should be handled. All of the classes listed in prefs should include AbstractFactory, at the base of their inheritance tree.