Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2012-06-12 20:10:48 +0000
committerThomas Watson2012-07-16 20:45:33 +0000
commit43ba9615791ef5653de5728bc916f0519811306e (patch)
tree37d76ca859a3742b87abf9f22023b00ed24c884c /bundles/org.eclipse.osgi/osgi/src/org
parent69dd42e9f03bfa20c895daf3d8c9ab0a5383c4a1 (diff)
downloadrt.equinox.framework-43ba9615791ef5653de5728bc916f0519811306e.tar.gz
rt.equinox.framework-43ba9615791ef5653de5728bc916f0519811306e.tar.xz
rt.equinox.framework-43ba9615791ef5653de5728bc916f0519811306e.zip
remove composite implementation
Diffstat (limited to 'bundles/org.eclipse.osgi/osgi/src/org')
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/service/framework/CompositeBundle.java164
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/service/framework/CompositeBundleFactory.java153
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/service/framework/SurrogateBundle.java78
3 files changed, 0 insertions, 395 deletions
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/framework/CompositeBundle.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/framework/CompositeBundle.java
deleted file mode 100644
index f935f9b87..000000000
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/framework/CompositeBundle.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.osgi.service.framework;
-
-import java.io.InputStream;
-import java.util.Map;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.launch.Framework;
-
-/**
- * Composite bundles are composed of other bundles. The component bundles which
- * make up the content of a composite bundle are installed into a child
- * framework. Like a normal bundle, a composite bundle may import packages and
- * use services from other bundles which are installed in the same framework as
- * the composite bundle. The packages imported and the services used by a
- * composite bundle are shared with the components of a composite bundle through
- * a surrogate bundle installed in the child framework. Also like a normal
- * bundle, a composite bundle may export packages and register services which
- * can be used by bundles installed in the same framework as the composite
- * bundle. The packages exported and the services registered by a composite
- * bundle are acquired from the components of a composite bundle by the
- * surrogate bundle installed in the child framework
- * <p>
- * A framework has one composite bundle for each of its child frameworks. A
- * framework can have zero or more composite bundles installed. A child
- * framework must have one and only one surrogate bundle which represents the
- * composite bundle in the parent framework. In other words, a parent framework
- * can have many child frameworks but a child framework can have only one
- * parent.
- * <p>
- * A composite bundle does the following as specified by the composite manifest
- * map:
- * <ul>
- * <li>Exports packages to the parent framework from the child framework. These
- * packages are imported by the surrogate bundle installed in the child
- * framework.</li>
- * <li>Imports packages from the parent framework. These packages are exported
- * by the surrogate bundle installed in the child framework.</li>
- * <li>Registers services to the parent framework from the child framework.
- * These services are acquired by the surrogate bundle installed in the child
- * framework.</li>
- * <li>Acquires services from the parent framework. These services are
- * registered by the surrogate bundle installed in the child framework.</li>
- * </ul>
- *
- * A newly created child <code>Framework</code> will be in the
- * {@link Bundle#STARTING STARTING} state. This child <code>Framework</code> can
- * then be used to manage and control the child framework instance. The child
- * framework instance is persistent and uses a storage area associated with the
- * installed composite bundle. The child framework's lifecycle is tied to its
- * composite bundle's lifecycle in the following ways:
- * <p>
- * <ul>
- * <li>If the composite bundle is marked to be persistently started (see
- * StartLevel.isBundlePersistentlyStarted(Bundle)) then the child framework
- * instance will automatically be started when the composite bundle's
- * start-level is met.</li>
- * <li>The child framework instance will be stopped if the composite bundle is
- * persistently stopped or its start level is no longer met. Performing
- * operations which transiently stop a composite bundle do not cause the child
- * framework to stop (e.g. {@link Bundle#stop(int) stop(Bundle.STOP_TRANSIENT)},
- * {@link Bundle#update() update}, refreshPackages etc.).</li>
- * <li>If the composite bundle is uninstalled, the child framework's persistent
- * storage area is also uninstalled.</li>
- * </ul>
- * <p>
- * The child framework may be persistently started and stopped by persistently
- * starting and stopping the composite bundle, but it is still possible to
- * initialize and start the child framework explicitly while the composite
- * bundle is not persistently started. This allows for the child framework to be
- * initialized and populated with a set of bundles before starting the composite
- * bundle. The set of bundles installed into the child framework are the
- * component bundles which comprise the composite bundle.
- * <p>
- * The child framework's lifecycle is also tied to the lifecycle of its
- * parent framework. When the parent <code>Framework</code> enters the
- * {@link Bundle#STOPPING STOPPING} state, all active child frameworks of that
- * parent are shutdown using the {@link Framework#stop()} method. The parent
- * framework must not enter the {@link Bundle#RESOLVED} state until all the
- * child frameworks have completed their shutdown process. Just as with other
- * Bundles, references to child frameworks (or the associated composite and
- * surrogate bundles) become invalid after the parent framework has completed
- * the shutdown process, and must not be allowed to re-initialize or re-start
- * the child framework.
- *
- * @see SurrogateBundle
- * @deprecated This API proposal was rejected by the OSGi Alliance and will
- * not be part of any OSGi specification. Please transition to the
- * org.osgi.framework.hooks API to control resolution, bundle, and service
- * isolation. This API will be removed from Equinox in the 3.9 release
- * You are cautioned against relying upon this API.
- * @ThreadSafe
- * @version $Revision: 6860 $
- */
-public interface CompositeBundle extends Bundle {
- /**
- * Returns the child framework associated with this composite bundle.
- *
- * @return the child framework.
- */
- Framework getCompositeFramework();
-
- /**
- * Returns the surrogate bundle associated with this composite bundle. The
- * surrogate bundle is installed in the child framework.
- *
- * @return the surrogate bundle.
- */
- SurrogateBundle getSurrogateBundle();
-
- /**
- * Updates this composite bundle with the specified manifest.
- * <p>
- * Similar to normal bundle updates, the packages exported by a composite or
- * surrogate bundle can not change as a result of calling update: the
- * previous package exports must be available to other consuming bundles (in
- * either the parent or child framework) until the
- * PackageAdmin.refreshPackages method has been called to refresh the
- * composite, or the parent Framework is re-launched.
- *
- * @param compositeManifest
- * the new composite manifest.
- * @throws BundleException
- * If the update fails.
- * @see CompositeBundleFactory#installCompositeBundle(Map, String, Map)
- */
- void update(Map /* <String, String> */compositeManifest) throws BundleException;
-
- /**
- * This operation is not supported for composite bundles. A
- * <code>BundleException</code> of type
- * {@link BundleException#INVALID_OPERATION invalid operation} must be
- * thrown.
- */
- void update() throws BundleException;
-
- /**
- * This operation is not supported for composite bundles. A
- * <code>BundleException</code> of type
- * {@link BundleException#INVALID_OPERATION invalid operation} must be
- * thrown.
- */
- void update(InputStream input) throws BundleException;
-
- /**
- * Uninstalls this composite bundle. The associated child framework
- * is shutdown, and its persistent storage area is deleted.
- */
- void uninstall() throws BundleException;
-}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/framework/CompositeBundleFactory.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/framework/CompositeBundleFactory.java
deleted file mode 100644
index 67e9de76d..000000000
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/framework/CompositeBundleFactory.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.osgi.service.framework;
-
-import java.util.Map;
-import org.osgi.framework.*;
-import org.osgi.framework.launch.Framework;
-
-/**
- * Framework service that is used to create composite bundles.
- * <p>
- * If present, there will only be a single instance of this service registered
- * with the Framework.
- *
- * @deprecated This API proposal was rejected by the OSGi Alliance and will
- * not be part of any OSGi specification. Please transition to the
- * org.osgi.framework.hooks API to control resolution, bundle, and service
- * isolation. This API will be removed from Equinox in the 3.9 release
- * You are cautioned against relying upon this API.
- * @ThreadSafe
- * @version $Revision: 6860 $
- */
-// TODO javadoc needs review
-public interface CompositeBundleFactory {
- /**
- * Manifest header (named &quot;CompositeServiceFilter-Import&quot;)
- * identifying the service filters that are used by a composite bundle
- * to select services that will be registered into a child framework by its
- * associated surrogate bundle.
- */
- public static final String COMPOSITE_SERVICE_FILTER_IMPORT = "CompositeServiceFilter-Import";
-
- /**
- * Manifest header (named &quot;CompositeServiceFilter-Export&quot;)
- * identifying the service filters that are used by a surrogate
- * bundle to select services that will be registered into a parent framework
- * by its associated composite bundle.
- */
- public static final String COMPOSITE_SERVICE_FILTER_EXPORT = "CompositeServiceFilter-Export";
-
- /**
- * Installs a <code>CompositeBundle</code>. The composite bundle has a new
- * child <code>Framework</code> associated with it and a surrogate bundle
- * which is installed in the child framework. Composite bundles share
- * packages and services between the parent framework they are installed in and
- * the child framework.
- * <p>
- * The following steps are required to create a composite bundle:
- * <ol>
- * <li>If a bundle containing the same location string is already installed
- * and the Bundle object is a <code>CompositeBundle</code>, then that
- * composite bundle is returned; otherwise a <code>BundleException</code>
- * is thrown indicating that an incompatible bundle is already installed at the
- * specified location.</li>
- * <li>The composite bundle's associated resources are allocated. The
- * associated resources minimally consist of a unique identifier and a
- * persistent storage area. If this step fails, a <code>BundleException</code>
- * is thrown.</li>
- * <li>The <code>compositeManifest</code> map is used to provide the headers for the
- * composite bundle and its surrogate bundle.
- * <p>
- * If composite manifest map does not contain the following header(s) then a
- * BundleException is thrown:
- * <ul>
- * <li> {@link Constants#BUNDLE_SYMBOLICNAME Bundle-SymbolicName} the
- * symbolic name used for the composite bundle and its surrogate bundle.
- * </ul>
- * </p><p>
- * The composite manifest map may optionally contain the following
- * header(s):
- * <ul>
- * <li> {@link Constants#BUNDLE_VERSION Bundle-Version} the bundle version
- * used for the composite bundle and its surrogate bundle.</li>
- * <li> {@link Constants#IMPORT_PACKAGE Import-Package} the packages which
- * are imported from the parent framework by the composite bundle and are
- * exported to the child framework by the surrogate bundle.</li>
- * <li>{@link Constants#EXPORT_PACKAGE Export-Package} the packages which
- * are imported from the child framework by the surrogate bundle and are
- * exported to the parent framework by the composite bundle.</li>
- * <li>{@link #COMPOSITE_SERVICE_FILTER_IMPORT
- * CompositeServiceFilter-Import} the service filters which are acquired
- * from the parent framework by the composite bundle and are registered in
- * the child framework by the surrogate bundle.</li>
- * <li>{@link #COMPOSITE_SERVICE_FILTER_EXPORT
- * CompositeServiceFilter-Export} the service filters which are acquired
- * from the child framework by the surrogate bundle and are registered in
- * the parent framework by the composite bundle.</li>
- * <li>{@link Constants#BUNDLE_MANIFESTVERSION Bundle-ManifestVersion} the
- * bundle manifest version. If this header is not specified then the default
- * is to use version 2. A <code>BundleException</code> is thrown if this header is
- * specified and the version is less than 2.</li>
- * <li>{@link Constants#REQUIRE_BUNDLE Require-Bundle} a bundle from the parent
- * which is required by the child. Support for this header is experimental: a
- * <code>BundleException</code> should be thrown if the header is present and
- * the framework doesn't support it.
- * </ul>
- * </p><p>
- * The composite manifest map must not contain the following headers. If a
- * composite manifest map does contain one of the following headers then a
- * <code>BundleException</code> is thrown:
- * <br/>
- * {@link Constants#BUNDLE_ACTIVATIONPOLICY Bundle-ActivationPolicy}<br/>
- * {@link Constants#BUNDLE_ACTIVATOR Bundle-Activator}<br/>
- * {@link Constants#BUNDLE_CLASSPATH Bundle-ClassPath}<br/>
- * {@link Constants#BUNDLE_LOCALIZATION Bundle-Localization}<br/>
- * {@link Constants#BUNDLE_NATIVECODE Bundle-NativeCode}<br/>
- * {@link Constants#FRAGMENT_HOST Fragment-Host}<br/>
- * {@link Constants#DYNAMICIMPORT_PACKAGE DynamicImport-Package}<br/>
- * <br/>
- * </li>
- * <li>A child framework is created which uses a storage area associated with
- * the composite bundle's persistent storage. The framework configuration
- * property {@link Constants#FRAMEWORK_STORAGE org.osgi.framework.storage},
- * if specified, is ignored.</li>
- * <li>The child framework is initialized (see {@link Framework#init()}).
- * <li>A surrogate bundle is created and installed into the child framework.</li>
- * <li>The composite bundle's state is set to INSTALLED.</li>
- * <li>A bundle event of type {@link BundleEvent#INSTALLED} is fired for the
- * composite bundle.
- * <li>The <code>CompositeBundle</code> object for the new composite
- * bundle is returned.
- * </ol>
- * <p>
- *
- * @param frameworkConfig A map containing configuration parameters used to
- * initialize and launch the child framework.
- * @param location The bundle location used for the composite and surrogate bundles.
- * @param compositeManifest A map containing the manifest used to create the composite
- * and surrogate bundles
- * @return A new composite bundle in INSTALLED state.
- * @throws BundleException If the composite manifest is invalid or there is
- * some other problem with installing the composite bundle.
- * @throws SecurityException If the caller does not have
- * <code>AllPermission</code>.
- * @see Framework
- * @see CompositeBundle
- */
- CompositeBundle installCompositeBundle(Map /* <String, String> */frameworkConfig, String location, Map /* <String, String> */compositeManifest) throws BundleException;
-
-}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/framework/SurrogateBundle.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/framework/SurrogateBundle.java
deleted file mode 100644
index 932654be7..000000000
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/framework/SurrogateBundle.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.osgi.service.framework;
-
-import java.io.InputStream;
-import org.osgi.framework.*;
-
-/**
- * A surrogate bundle is installed in a child framework, and is the child-facing
- * representation of the composite bundle in the parent framework.
- * <p>
- * A surrogate bundle does the following as specified by the composite manifest:
- * <ul>
- * <li>Exports packages to the child framework from the parent framework. These
- * packages are imported by the composite bundle installed in the parent
- * framework.</li>
- * <li>Imports packages from the child framework. These packages are exported
- * by the composite bundle installed in the parent framework.</li>
- * <li>Registers services from the parent framework with the child framework.
- * These services are acquired by the composite bundle installed in the
- * parent framework.</li>
- * <li>Acquires services from the child framework. These services are
- * registered by the composite bundle installed in the parent framework.</li>
- * </ul>
- * <p>
- * @see CompositeBundle
- * @deprecated This API proposal was rejected by the OSGi Alliance and will
- * not be part of any OSGi specification. Please transition to the
- * org.osgi.framework.hooks API to control resolution, bundle, and service
- * isolation. This API will be removed from Equinox in the 3.9 release
- * You are cautioned against relying upon this API.
- */
-public interface SurrogateBundle extends Bundle {
- /**
- * Returns the bundle context of the associated composite bundle.
- * @return the bundle context of the composite bundle. A value
- * of <code>null</code> is returned if the composite bundle does
- * not have a valid bundle context.
- */
- BundleContext getCompositeBundleContext();
-
- /**
- * This operation is not supported for surrogate bundles. A
- * <code>BundleException</code> of type
- * {@link BundleException#INVALID_OPERATION invalid operation} must be
- * thrown.
- */
- void update() throws BundleException;
-
- /**
- * This operation is not supported for surrogate bundles. A
- * <code>BundleException</code> of type
- * {@link BundleException#INVALID_OPERATION invalid operation} must be
- * thrown.
- */
- void update(InputStream input) throws BundleException;
-
- /**
- * This operation is not supported for surrogate bundles. A
- * <code>BundleException</code> of type
- * {@link BundleException#INVALID_OPERATION invalid operation} must be
- * thrown.
- */
- void uninstall() throws BundleException;
-}

Back to the top