Class FactoryFinder
- java.lang.Object
-
- org.apache.activemq.artemis.utils.FactoryFinder
-
public class FactoryFinder extends java.lang.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(java.lang.String path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FactoryFinder.ObjectFactorygetObjectFactory()java.lang.ObjectnewInstance(java.lang.String key)Creates a new instance of the given keystatic voidsetObjectFactory(FactoryFinder.ObjectFactory objectFactory)
-
-
-
Method Detail
-
getObjectFactory
public static FactoryFinder.ObjectFactory getObjectFactory()
-
setObjectFactory
public static void setObjectFactory(FactoryFinder.ObjectFactory objectFactory)
-
newInstance
public java.lang.Object newInstance(java.lang.String key) throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.io.IOException, java.lang.ClassNotFoundExceptionCreates 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:
java.lang.IllegalAccessException- On illegal accessjava.lang.InstantiationException- On can not instantiate exceptionjava.io.IOException- On IOExceptionjava.lang.ClassNotFoundException- When class not on class path
-
-