Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] API changes to new OSGi APIs in Indigo

In Equinox we have been busy implementing the next OSGi Core Framework R4.3 specification. For Indigo M6 there are a number of changes occurring to newly introduced OSGi API which are changing in breaking ways from the Indigo M5 equinox contribution. These are only breaking changes for some of the newly introduced API in Indigo. Existing Core OSGi APIs which were released with Helios are not changing in incompatible ways.

If you have started to use any new API from the following packages in Equinox then continue reading; otherwise thank you for your time and you can ignore the rest of this message:

org.osgi.framework.hooks.resolver
org.osgi.framework.wiring
org.eclipse.osgi.service.resolver

The changes to these packages have been released today for the eclipse/equinox projects nightly builds. I have already fixed all the code within the eclipse project and equinox project which referenced the changed APIs and have done a successful test build. So this note should only be important to committers on other projects that may have started using the APIs which are changing. The following is a summary of the changes that will be coming in next week integration build for the equinox and eclipse projects. Let me know if you have any questions or concerns.

Package org.osgi.framework.hooks.resolver

The first changes are in the org.osgi.framework.hooks.resolver package to the ResolverHook interface to the filterMatches method:

Old M5 method:
void filterMatches(BundleRevision requirer, Collection<Capability> candidates)

New M6 method:
void filterMatches(BundleRequirement requirement, Collection<BundleCapability> candidates);

In M5 this method took a parameter of type BundleRevision which represented the bundle revision with a requirement. In M6 the method will take a BundleRequirement object instead to represent the actual requirement. The
BundleReqiurement object allows you to get access to the requirer BundleRevision.

Package org.osgi.framework.wiring

The second set of changes are in the org.osgi.framework.wiring package. This is where a majority of the breaking changes are happening.

- Capability is renamed to BundleCapability

- BundleWirings is gone. There is now a BundleRevisions interface which can be used to find old removal pending bundles.

- WiredCapability is gone. A concept of BundleWire is added to represent wires between BundleRequirement objects and BundleCapability objects.

- BundleWiring interface has had a number of methods removed which used the WiredCapability type. Methods dealing with attached fragment revisions has also been removed. Fragments can now be discovered through the
use of BundleWire objects using the osgi.wiring.host namespace.


Package org.eclipse.osgi.service.resolver

- BundleWiring objects are obtained directly from the BundleRevision interface which BundleDescription implements. This eliminated the need for the BundleDescription.getBundleWiring() method.

- A number of other changes were made to accommodate the change from Capability to BundleCapability type as well as the introduction of the BundleWire concept.

Tom


Back to the top