Class FactoryFinder
- java.lang.Object
-
- org.apache.activemq.artemis.utils.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 the setObjectFactory 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:
IllegalAccessException- On illegal accessInstantiationException- On can not instantiate exceptionIOException- On IOExceptionClassNotFoundException- When class not on class path
-
-