KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > phoenix > interfaces > ClassLoaderManager


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.phoenix.interfaces;
9
10 import java.io.File JavaDoc;
11 import org.apache.avalon.framework.configuration.Configuration;
12
13 /**
14  * Interface for component that creates and manages the
15  * {@link ClassLoader} for an Application. The specific
16  * mechanism by which the {@link ClassLoader} is created
17  * is dependent on the type of {@link Embeddor} and the
18  * deployment format.
19  *
20  * @author <a HREF="mailto:peter at apache.org">Peter Donald</a>
21  */

22 public interface ClassLoaderManager
23 {
24     String JavaDoc ROLE = ClassLoaderManager.class.getName();
25
26     /**
27      * Create a {@link ClassLoader} for a specific application.
28      *
29      * @param environment the configuration "environment.xml" for the application
30      * @param source the source of application. (usually the name of the .sar file
31      * or else the same as baseDirectory)
32      * @param baseDirectory the base directory of application
33      * @param workDirectory the work directory of application
34      * @param classPath the list of URLs in applications deployment
35      * @return the ClassLoader created
36      * @throws Exception if an error occurs
37      */

38     ClassLoader JavaDoc createClassLoader( Configuration environment,
39                                    File JavaDoc source,
40                                    File JavaDoc baseDirectory,
41                                    File JavaDoc workDirectory,
42                                    String JavaDoc[] classPath )
43         throws Exception JavaDoc;
44 }
45
Popular Tags