Package org.apache.activemq.util
Class FactoryFinder
- java.lang.Object
-
- org.apache.activemq.util.FactoryFinder
-
public class FactoryFinder extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFactoryFinder.ObjectFactoryThe strategy that the FactoryFinder uses to find load and instantiate Objects can be changed out by calling thesetObjectFactory(org.apache.activemq.util.FactoryFinder.ObjectFactory)method with a custom implementation of ObjectFactory.protected static classFactoryFinder.StandaloneObjectFactoryThe default implementation of Object factory which works well in standalone applications.
-
Constructor Summary
Constructors Constructor Description FactoryFinder(String path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FactoryFinder.ObjectFactorygetObjectFactory()ObjectnewInstance(String key)Creates a new instance of the given keystatic voidsetObjectFactory(FactoryFinder.ObjectFactory objectFactory)
-
-
-
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:
IllegalAccessExceptionInstantiationExceptionIOExceptionClassNotFoundException
-
-