public interface CompositeBundleFactory
If present, there will only be a single instance of this service registered with the Framework.
Modifier and Type | Field and Description |
---|---|
static String |
COMPOSITE_SERVICE_FILTER_EXPORT
Deprecated.
Manifest header (named "CompositeServiceFilter-Export")
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.
|
static String |
COMPOSITE_SERVICE_FILTER_IMPORT
Deprecated.
Manifest header (named "CompositeServiceFilter-Import")
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.
|
Modifier and Type | Method and Description |
---|---|
CompositeBundle |
installCompositeBundle(Map frameworkConfig,
String location,
Map compositeManifest)
Deprecated.
Installs a
CompositeBundle . |
static final String COMPOSITE_SERVICE_FILTER_IMPORT
static final String COMPOSITE_SERVICE_FILTER_EXPORT
CompositeBundle installCompositeBundle(Map frameworkConfig, String location, Map compositeManifest) throws BundleException
CompositeBundle
. The composite bundle has a new
child Framework
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.
The following steps are required to create a composite bundle:
CompositeBundle
, then that
composite bundle is returned; otherwise a BundleException
is thrown indicating that an incompatible bundle is already installed at the
specified location.BundleException
is thrown.compositeManifest
map is used to provide the headers for the
composite bundle and its surrogate bundle.
If composite manifest map does not contain the following header(s) then a BundleException is thrown:
Bundle-SymbolicName
the
symbolic name used for the composite bundle and its surrogate bundle.
The composite manifest map may optionally contain the following header(s):
Bundle-Version
the bundle version
used for the composite bundle and its surrogate bundle.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.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.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.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.Bundle-ManifestVersion
the
bundle manifest version. If this header is not specified then the default
is to use version 2. A BundleException
is thrown if this header is
specified and the version is less than 2.Require-Bundle
a bundle from the parent
which is required by the child. Support for this header is experimental: a
BundleException
should be thrown if the header is present and
the framework doesn't support it.
The composite manifest map must not contain the following headers. If a
composite manifest map does contain one of the following headers then a
BundleException
is thrown:
Bundle-ActivationPolicy
Bundle-Activator
Bundle-ClassPath
Bundle-Localization
Bundle-NativeCode
Fragment-Host
DynamicImport-Package
org.osgi.framework.storage
,
if specified, is ignored.Framework.init()
).
BundleEvent.INSTALLED
is fired for the
composite bundle.
CompositeBundle
object for the new composite
bundle is returned.
frameworkConfig
- A map containing configuration parameters used to
initialize and launch the child framework.location
- The bundle location used for the composite and surrogate bundles.compositeManifest
- A map containing the manifest used to create the composite
and surrogate bundlesBundleException
- If the composite manifest is invalid or there is
some other problem with installing the composite bundle.SecurityException
- If the caller does not have
AllPermission
.Framework
,
CompositeBundle
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.