KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > classloader > LoaderManager


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005 Fossil E-Commerce, http://www.fossilec.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id: LoaderManager.java 241 2006-04-19 13:16:21Z alouis $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.classloader;
23
24 import java.net.URL JavaDoc;
25 import java.net.URLClassLoader JavaDoc;
26 import java.util.List JavaDoc;
27
28 import org.objectweb.petals.PetalsException;
29
30 /**
31  *
32  * @version $Rev: 241 $ $Date: 2006-04-19 13:16:21Z $
33  * @since Petals 1.0
34  * @author Adrien LOUIS, <a HREF="mailto:rmarins@fossilec.com">Rafael Marins</a>
35  */

36 public interface LoaderManager {
37     
38     
39     /**
40      * Must not return null.
41      * @param baseUrls
42      * @param classpathUrls
43      * @param useParentFirst
44      * @return
45      * @throws PetalsException
46      */

47     public URLClassLoader JavaDoc createClassLoader(URL JavaDoc[] baseUrls, List JavaDoc<String JavaDoc> classpathUrls, boolean useParentFirst)
48     throws PetalsException;
49     
50 /**
51  *
52  * @param classLoaderId
53  * @param baseUrls
54  * @param classpathUrls
55  * @param useParentFirst
56  * @param sharedLibrariesNameList
57  * @return
58  * @throws PetalsException
59  */

60     public URLClassLoader JavaDoc createComponentClassLoader(String JavaDoc classLoaderId, URL JavaDoc[] baseUrls, List JavaDoc<String JavaDoc> classpathUrls,
61             boolean useParentFirst, List JavaDoc<String JavaDoc> sharedLibrariesNameList) throws PetalsException;
62
63     
64     /**
65      * Create a classloader for a sharedLibrary.
66      * This classLoader will be added to the SharedLibrariesClassLoader.
67      * @param baseUrls
68      * @param classpathUrls
69      * @param useParentFirst
70      * @return
71      * @throws PetalsException
72      */

73     public URLClassLoader JavaDoc createSharedLibrariesClassLoader(String JavaDoc classLoaderId, URL JavaDoc[] baseUrls, List JavaDoc<String JavaDoc> classpathUrls,
74             boolean useParentFirst) throws PetalsException;
75     
76     public boolean containsClassLoader(String JavaDoc classLoaderId);
77     
78     /**
79      * Remove the classLoader from the list.
80      * If the classLoader is a ClassLoader for sharedLibraries,
81      * remove it from the SharedLibrariesClassLoader
82      */

83     public void deleteClassLoader(String JavaDoc classLoaderId);
84 }
85
Popular Tags