Package org.apache.qpid.jms.util
Class FactoryFinder.StandaloneObjectFactory
java.lang.Object
org.apache.qpid.jms.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 stand-alone applications.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates the requested factory instance.static Class<?>loadClass(Properties properties) static PropertiesloadProperties(String uri)
-
Constructor Details
-
StandaloneObjectFactory
protected StandaloneObjectFactory()
-
-
Method Details
-
create
public Object create(String path) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException, ResourceNotFoundException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException Description copied from interface:FactoryFinder.ObjectFactoryCreates the requested factory instance.- Specified by:
createin interfaceFactoryFinder.ObjectFactory- Parameters:
path- the full service path- Returns:
- instance of the factory object being searched for.
- Throws:
InstantiationException- if the factory object fails on create.IllegalAccessException- if an error occurs while accessing the search path.ClassNotFoundException- if the class that is to be loaded cannot be found.IOException- if the search encounter an IO error.ResourceNotFoundException- if the path does not exist.InvocationTargetException- if the constructor of the found factory throws an exceptionNoSuchMethodException- if the factory class found does not have a suitable constructorSecurityException- if a security error occurs trying to create the factory instance.IllegalArgumentException
-
loadClass
- Throws:
ClassNotFoundExceptionIOException
-
loadProperties
- Throws:
IOExceptionResourceNotFoundException
-