org.apache.activemq.util
Class FactoryFinder

java.lang.Object
  extended by org.apache.activemq.util.FactoryFinder

public class FactoryFinder
extends Object


Nested Class Summary
static interface FactoryFinder.ObjectFactory
          The strategy that the FactoryFinder uses to find load and instantiate Objects can be changed out by calling the setObjectFactory(org.apache.activemq.util.FactoryFinder.ObjectFactory) method with a custom implementation of ObjectFactory.
protected static class FactoryFinder.StandaloneObjectFactory
          The default implementation of Object factory which works well in standalone applications.
 
Constructor Summary
FactoryFinder(String path)
           
 
Method Summary
static FactoryFinder.ObjectFactory getObjectFactory()
           
 Object newInstance(String key)
          Creates a new instance of the given key
static void setObjectFactory(FactoryFinder.ObjectFactory objectFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactoryFinder

public FactoryFinder(String path)
Method Detail

getObjectFactory

public static FactoryFinder.ObjectFactory getObjectFactory()

setObjectFactory

public static void setObjectFactory(FactoryFinder.ObjectFactory objectFactory)

newInstance

public Object newInstance(String key)
                   throws IllegalAccessException,
                          InstantiationException,
                          IOException,
                          ClassNotFoundException
Creates a new instance of the given key

Parameters:
key - is the key to add to the path to find a text file containing the factory name
Returns:
a newly created instance
Throws:
IllegalAccessException
InstantiationException
IOException
ClassNotFoundException


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.