org.codehaus.activemq.util
Class FactoryFinder
java.lang.Object
org.codehaus.activemq.util.FactoryFinder
- public class FactoryFinder
- extends java.lang.Object
A helper class to discover protocols dynamically to ensure
that the system is extensible and has minimum runtime dependencies
- Version:
- $Revision: 1.1 $
Method Summary |
java.lang.Class |
findClass(java.lang.String key)
Loads the class for the given key |
protected java.lang.Class |
loadClass(java.lang.String name)
|
java.lang.Object |
newInstance(java.lang.String key)
Creates a new instance of the given key |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FactoryFinder
public FactoryFinder(java.lang.String path)
newInstance
public java.lang.Object newInstance(java.lang.String key)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.io.IOException,
java.lang.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:
java.lang.IllegalAccessException
java.lang.InstantiationException
java.io.IOException
java.lang.ClassNotFoundException
findClass
public java.lang.Class findClass(java.lang.String key)
throws java.io.IOException,
java.lang.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:
java.io.IOException
java.lang.ClassNotFoundException
loadClass
protected java.lang.Class loadClass(java.lang.String name)
throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
Copyright © 2004 Protique, Ltd.. All Rights Reserved.