Author: pderop
Date: Wed Dec 26 14:16:43 2018
New Revision: 1849770
URL: http://svn.apache.org/viewvc?rev=1849770&view=rev
Log:
Updated what's new in dm r15
Added:
felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew-r15.mdtext
- copied, changed from r1849769,
felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew-r13.mdtext
Copied:
felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew-r15.mdtext
(from r1849769,
felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew-r13.mdtext)
URL:
http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew-r15.mdtext?p2=felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew-r15.mdtext&p1=felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew-r13.mdtext&r1=1849769&r2=1849770&rev=1849770&view=diff
==============================================================================
---
felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew-r13.mdtext
(original)
+++
felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/whatsnew-r15.mdtext
Wed Dec 26 14:16:43 2018
@@ -16,7 +16,7 @@ Notice: Licensed to the Apache Softwa
specific language governing permissions and limitations
under the License.
-This section describes some enhancements and API modification which have been
performed in the dependency manager r13 release.
+This section describes some enhancements and API modification which have been
performed in the dependency manager r15 release.
Mainly,
- Support for Java 9/10/11
@@ -112,41 +112,7 @@ various parameters used when declaring a
}
}
-now, we explain what the new interfaces look like: Indeed as you can imagine,
there is an issue when
-you extend the Component interface, because the various Component setter
methods return a Component type.
-So, what we would like is to be able to introduce a generic type in the
Component interface , and such
-generic type can then be used to allow the Component setter methods to return
not the Component type,
-but instead return the aspect/adapter sub classes. This is what we have done,
let's show a pseudo code,
-so you can understand how it works:
-
-First, the Component annotation have been reworked like this:
-
- :::java
- public interface Component<T extends Component<T>> {
- T setInterface(String service, Dictionary properties)
- T setImplementation(Object ob);
- ...
- }
-
-As you can see the Component annotation is now using a recursive generic type
which extends the Component interface.
-And now we have for example the following AdapterComponent interface which is
defined like this:
-
- :::java
- public interface AdapterComponent extends Component<AdapterComponent> {
- AdapterComponent setAdaptee(Class<?> service, String filter);
- AdapterComponent setAdapteeCallbacks(String add, String change, String
remove, String swap);
- ...
- }
-
-So, now, an adapter component can be defined like this:
-
- :::java
- Component adapter = createAdapterComponent()
- .setAdaptee(Adaptee.class, "(foo=bar)")
- .setAdapteeCallbacks("setAdaptee", "changeAdaptee", null, null)
- .setImplementation(AdapterImpl.class)
- .setInterface(AdapterService.class, null)
- .add(createServiceDependency().setService(LogService.class));
+You will find the javadoc of the new dm api
[here](http://felix.apache.org/apidocs/dependencymanager/r15)
### Support for multiple configuration types in callbacks