Package org.apache.activemq.util
Class FactoryFinder.StandaloneObjectFactory
java.lang.Object
org.apache.activemq.util.FactoryFinder.StandaloneObjectFactory
- All Implemented Interfaces:
FactoryFinder.ObjectFactory
- Enclosing class:
- FactoryFinder<T>
protected static class FactoryFinder.StandaloneObjectFactory
extends Object
implements FactoryFinder.ObjectFactory
The default implementation of Object factory which works well in standalone applications.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
StandaloneObjectFactory
protected StandaloneObjectFactory()
-
-
Method Details
-
create
public Object create(String path) throws IllegalAccessException, InstantiationException, IOException, ClassNotFoundException - Specified by:
createin interfaceFactoryFinder.ObjectFactory- Parameters:
path- the full service path- Returns:
- Throws:
IllegalAccessExceptionInstantiationExceptionIOExceptionClassNotFoundException
-
create
public <T> T create(String path, Class<T> requiredType, Set<Class<? extends T>> allowedImpls) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException Description copied from interface:FactoryFinder.ObjectFactoryThis method loads objects by searching for classes in the given path. A requiredType and Set of allowed implementations are provided for implementations to use for validation. Note is up to the actual implementations that implementFactoryFinder.ObjectFactoryto decide how to use both parameters. By default, the method just delegates toFactoryFinder.ObjectFactory.create(String)- Specified by:
createin interfaceFactoryFinder.ObjectFactory- Parameters:
path- the full service pathrequiredType- the requiredType any objects must implementallowedImpls- The set of allowed impls- Returns:
- Throws:
InstantiationExceptionIllegalAccessExceptionClassNotFoundExceptionIOException
-
loadProperties
- Throws:
IOException
-