01: /* JFox, the OpenSource J2EE Application Server
02: *
03: * Copyright (C) 2002 huihoo.org
04: * Distributable under GNU LGPL license
05: * See the GNU Lesser General Public License for more details.
06: */
07:
08: package javax.management.loading;
09:
10: /**
11: * Instances of this interface are used to keep the list of Class Loaders registered in a MBean Server.
12: * They provide the necessary methods to load classes using the registered Class Loaders.
13: *
14: * @author <a href="mailto:young_yy@hotmail.org">Young Yang</a>
15: */
16:
17: public interface ClassLoaderRepository {
18:
19: /**
20: * Go through the list of class loaders and try to load the requested class.
21: * The method will doStop as soon as the class is found.
22: * If the class is not found the method will throw a ClassNotFoundException exception
23: *
24: * @param className The name of the class to be loaded.
25: * @throws ClassNotFoundException
26: */
27: public Class loadClass(String className)
28: throws ClassNotFoundException;
29:
30: /**
31: * Go through the list of class loaders but exclude the given class loader,
32: * then try to load the requested class. The method will doStop as soon as the class is found.
33: * If the class is not found the method will throw a ClassNotFoundException exception
34: *
35: * @param loader The class loader to be excluded.
36: * @param className The name of the class to be loaded.
37: * @throws ClassNotFoundException
38: */
39: public Class loadClassWithout(ClassLoader loader, String className)
40: throws ClassNotFoundException;
41: }
|