KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > mobilitools > smi > lib > RMIClassLoaderAdapter


1 /*
2 * MobiliTools: an implementation of the Object Management Group's
3 * Mobile Agent Facility specification.
4 * Copyright (C) 2003 France Telecom R&D
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 * MobiliTools $Name: $
21 *
22 * Contact: mobilitools-smi@lists.debian-sf.objectweb.org
23 *
24 * Authors: Bruno Dillenseger
25 */

26
27
28 package org.objectweb.mobilitools.smi.lib;
29
30
31 import org.omg.CfMAF.AgentProfile;
32 import org.omg.CfMAF.MAFAgentSystem;
33 import java.rmi.server.RMIClassLoader JavaDoc;
34 import java.net.MalformedURLException JavaDoc;
35
36
37 /**
38  * MobiliTools $Name: $, $Id: RMIClassLoaderAdapter.java,v 1.1.1.1 2003/03/28 14:48:06 dillense Exp $
39  * <P>
40  * Classloader factory providing RMI classloaders.
41  * Should be used if and only if the agents use RMI.
42  */

43 abstract public class RMIClassLoaderAdapter
44 {
45     /**
46      * @param parent ignored
47      * @param codebase RMI-style codebase (i.e. URL strings separated with blanks)
48      * @param profile ignored
49      * @param provider ignored
50      * @return the RMI classloader associated to the given codebase
51      */

52     static public ClassLoader JavaDoc getClassLoader(
53         ClassLoader JavaDoc parent,
54         String JavaDoc codebase,
55         AgentProfile profile,
56         MAFAgentSystem provider)
57     throws MalformedURLException JavaDoc
58     {
59         return RMIClassLoader.getClassLoader(codebase);
60     }
61 }
62
Popular Tags