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 Modifier Constructor Description protectedStandaloneObjectFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectcreate(String path)Creates the requested factory instance.static Class<?>loadClass(Properties properties)static PropertiesloadProperties(String uri)
-
-
-
Method Detail
-
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
public static Class<?> loadClass(Properties properties) throws ClassNotFoundException, IOException
- Throws:
ClassNotFoundExceptionIOException
-
loadProperties
public static Properties loadProperties(String uri) throws IOException, ResourceNotFoundException
- Throws:
IOExceptionResourceNotFoundException
-
-