bundle.adapt(FrameworkWiring.class) on the system
bundle. Only the system bundle can be adapted to a FrameworkWiring object.
The system bundle associated with this FrameworkWiring object can be obtained
by calling BundleReference#getBundle().
| Modifier and Type | Method and Description |
|---|---|
| public Collection | Returns: A collection ofBundleCapability objects that match the
specified requirement.The requirement to find matching bundle capabilities.
Must not be requirement)null.Find bundle capabilities that match the given requirement. |
| public Collection | Returns: A collection containing a snapshot of the dependency closure of the specified bundles, or an empty collection if there were no specified bundles.The initial bundles for which to generate the dependency
closure. bundles)Returns the dependency closure for the specified bundles. |
| public Collection | Returns: A collection containing a snapshot of theBundles which
have non-current, in use BundleWirings, or an empty
collection if there are no such bundles.Returns the bundles that have |
| public void | refreshBundles(Collection<Bundle>
The bundles to be refreshed, or bundles, FrameworkListener... null to refresh
the removal pending bundles.Zero or more listeners to be notified when the bundle
refresh has been completed. The specified listeners do not need to
be otherwise registered with the framework. If a specified
listener is already registered with the framework, it will be
notified twice. listeners)Refreshes the specified bundles. |
| public boolean | Returns: true if all specified bundles are resolved; false
otherwise.The bundles to resolve or bundles)null to resolve all
unresolved bundles installed in the Framework.Resolves the specified bundles. |
| findProviders | back to summary |
|---|---|
| public Collection Find bundle capabilities that match the given requirement.
The returned collection contains Each returned capability must match the given requirement. This means that the filter in the requirement must match as well as any namespace specific directives. For example, the mandatory attributes for the osgi.wiring.package namespace. The returned collection has not been filtered to remove capabilities that are non-effective, substituted or for which the providing bundle does not have permission to provide. No resolve hooks are called to filter matching capabilities.
| |
| getDependencyClosure | back to summary |
|---|---|
| public Collection Returns the dependency closure for the specified bundles.
A graph of bundles is computed starting with the specified bundles. The
graph is expanded by adding any bundle that is either wired to a package
that is currently exported by a bundle in the graph or requires a bundle
in the graph. The graph is fully constructed when there is no bundle
outside the graph that is wired to a bundle in the graph. The graph may
contain
| |
| getRemovalPendingBundles | back to summary |
|---|---|
| public Collection Returns the bundles that have
| |
| refreshBundles | back to summary |
|---|---|
| public void refreshBundles(Collection<Bundle> bundles, FrameworkListener... listeners) Refreshes the specified bundles. This forces the update (replacement) or removal of packages exported by the specified bundles. The technique by which the framework refreshes bundles may vary among different framework implementations. A permissible implementation is to stop and restart the framework. This method returns to the caller immediately and then performs the following steps on a separate thread:
For any exceptions that are thrown during any of these steps, a framework
event of type
When this process completes after the bundles are refreshed, the
Framework will fire a Framework event of type
| |
| resolveBundles | back to summary |
|---|---|
| public boolean resolveBundles(Collection<Bundle> bundles) Resolves the specified bundles. The Framework must attempt to resolve the specified bundles that are unresolved. Additional bundles that are not included in the specified bundles may be resolved as a result of calling this method. A permissible implementation of this method is to attempt to resolve all unresolved bundles installed in the framework. If no bundles are specified, then the Framework will attempt to resolve all unresolved bundles. This method must not cause any bundle to be refreshed, stopped, or started. This method will not return until the operation has completed.
| |