Package org.apache.qpid.jms.util
Interface FactoryFinder.ObjectFactory
-
- All Known Implementing Classes:
FactoryFinder.StandaloneObjectFactory
- Enclosing class:
- FactoryFinder<T>
public static interface FactoryFinder.ObjectFactoryThe strategy that the FactoryFinder uses to find load and instantiate Objects can be changed out by calling theFactoryFinder.setObjectFactory(org.apache.qpid.jms.util.FactoryFinder.ObjectFactory)method with a custom implementation of ObjectFactory. The default ObjectFactory is typically changed out when running in a specialized container environment where service discovery needs to be done via the container system. For example, in an OSGi scenario.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectcreate(java.lang.String path)Creates the requested factory instance.
-
-
-
Method Detail
-
create
java.lang.Object create(java.lang.String path) throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.io.IOException, java.lang.ClassNotFoundException, ResourceNotFoundException, java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.reflect.InvocationTargetExceptionCreates the requested factory instance.- Parameters:
path- the full service path- Returns:
- instance of the factory object being searched for.
- Throws:
java.lang.IllegalAccessException- if an error occurs while accessing the search path.java.lang.InstantiationException- if the factory object fails on create.ResourceNotFoundException- if the path does not exist.java.io.IOException- if the search encounter an IO error.java.lang.ClassNotFoundException- if the class that is to be loaded cannot be found.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.
-
-