org.codehaus.activemq.util
Class FactoryFinder
java.lang.Object
org.codehaus.activemq.util.FactoryFinder
- public class FactoryFinder
- extends Object
A helper class to discover protocols dynamically to ensure
that the system is extensible and has minimum runtime dependencies
- Version:
- $Revision: 1.2 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FactoryFinder
public FactoryFinder(String path)
newInstance
public Object newInstance(String key)
throws IllegalAccessException,
InstantiationException,
IOException,
ClassNotFoundException
- Creates a new instance of the given key
- Parameters:
key
- is the key to add to the path to find a text file containing the factory name
- Returns:
- a newly created instance
- Throws:
IllegalAccessException
InstantiationException
IOException
ClassNotFoundException
findClass
public Class findClass(String key)
throws IOException,
ClassNotFoundException
- Loads the class for the given key
- Parameters:
key
- is the key to add to the path to find a text file containing the factory name
- Returns:
- the class for the given key
- Throws:
IOException
ClassNotFoundException
loadClass
protected Class loadClass(String name)
throws ClassNotFoundException
- Throws:
ClassNotFoundException
Copyright © 2004 Protique, Ltd.. All Rights Reserved.