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 java.lang.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 java.lang.Objectcreate(java.lang.String path)Creates the requested factory instance.static java.lang.Class<?>loadClass(java.util.Properties properties)static java.util.PropertiesloadProperties(java.lang.String uri)
-
-
-
Method Detail
-
create
public java.lang.Object create(java.lang.String path) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.io.IOException, ResourceNotFoundException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.SecurityExceptionDescription 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:
java.lang.InstantiationException- if the factory object fails on create.java.lang.IllegalAccessException- if an error occurs while accessing the search path.java.lang.ClassNotFoundException- if the class that is to be loaded cannot be found.java.io.IOException- if the search encounter an IO error.ResourceNotFoundException- if the path does not exist.java.lang.reflect.InvocationTargetException- if the constructor of the found factory throws an exceptionjava.lang.NoSuchMethodException- if the factory class found does not have a suitable constructorjava.lang.SecurityException- if a security error occurs trying to create the factory instance.java.lang.IllegalArgumentException
-
loadClass
public static java.lang.Class<?> loadClass(java.util.Properties properties) throws java.lang.ClassNotFoundException, java.io.IOException- Throws:
java.lang.ClassNotFoundExceptionjava.io.IOException
-
loadProperties
public static java.util.Properties loadProperties(java.lang.String uri) throws java.io.IOException, ResourceNotFoundException- Throws:
java.io.IOExceptionResourceNotFoundException
-
-