KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > framework > adaptor > core > AdaptorElementFactory


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.osgi.framework.adaptor.core;
12
13 import java.io.IOException JavaDoc;
14 import org.eclipse.osgi.framework.adaptor.BundleClassLoader;
15 import org.eclipse.osgi.framework.adaptor.BundleProtectionDomain;
16 import org.eclipse.osgi.framework.adaptor.ClassLoaderDelegate;
17
18 /**
19  * This interface allows extending adaptors to control how BundleData and BundleClassLoader
20  * objects are created.
21  * <p>
22  * Clients may implement this interface.
23  * </p>
24  * @since 3.1
25  */

26 public interface AdaptorElementFactory {
27     /**
28      * Creates a bundle data object for a bundle
29      * @param adaptor the adaptor creating the bundle data for
30      * @param id the bundle ID to use for the constructed bundle data object
31      * @return a bundle data object for a bundle
32      * @throws IOException
33      */

34     public AbstractBundleData createBundleData(AbstractFrameworkAdaptor adaptor, long id) throws IOException JavaDoc;
35
36     /**
37      * Creates a bundle classloader for a bundle
38      * @param delegate the classloader delegate
39      * @param domain the classloader domain
40      * @param bundleclasspath the classloader classapth
41      * @param data the classloader bundle data
42      * @return a bundle classloader for a bundle
43      */

44     public BundleClassLoader createClassLoader(ClassLoaderDelegate delegate, BundleProtectionDomain domain, String JavaDoc[] bundleclasspath, AbstractBundleData data);
45
46 }
47
Popular Tags