You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by bu...@apache.org on 2018/10/22 17:16:15 UTC
svn commit: r1036460 - in /websites/staging/felix/trunk/content: ./
documentation/subprojects/apache-felix-dependency-manager/reference/dm-annotations.html
Author: buildbot
Date: Mon Oct 22 17:16:15 2018
New Revision: 1036460
Log:
Staging update by buildbot for felix
Modified:
websites/staging/felix/trunk/content/ (props changed)
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/dm-annotations.html
Propchange: websites/staging/felix/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Oct 22 17:16:15 2018
@@ -1 +1 @@
-1844587
+1844588
Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/dm-annotations.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/dm-annotations.html (original)
+++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/dm-annotations.html Mon Oct 22 17:16:15 2018
@@ -281,7 +281,7 @@ So, in this case the dictionaries will b
<p>Components are the main building blocks for OSGi applications and can be annotated with @Component. They can publish themselves as a
service, and/or they can have dependencies. These dependencies will influence their life cycle as component
will only be activated when all required dependencies are available. To define a component, you can use the @Component annotation
-(see <a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/Component.html">@Component javadoc</a>).</p>
+(see <a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/Component.html">@Component javadoc</a>).</p>
<p>Applying this annotation on top of a java class let it be a service component. All directly implemented
interfaces will be registered in the osgi registry, but you can control the provided interfaces using the <code>provides</code> attribute.
Sometimes, your class implements some interfaces, but yet you don't want them to be registered, in this case, declaring <code>provides={}</code> ensures that
@@ -371,7 +371,7 @@ detected. Then the Aspect Service is pro
updated with the aspect. Aspects can be chained and may apply to the same target service (and in this case,
the ranking of the Aspect service is used to chain aspects in the proper order).</p>
<p>You can define an aspect service using the @AspectService annotation (see
-<a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/AspectService.html">@AspectService javadoc</a>).</p>
+<a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/AspectService.html">@AspectService javadoc</a>).</p>
<p>Usage example:</p>
<p>Here, the <code>Aspect</code> class is registered into the OSGI registry each time an
InterceptedService is found from the registry. </p>
@@ -397,7 +397,7 @@ the publication of (in this case) a diff
and allow you to keep your basic services implementations clean and simple, adding extra features on top of
them in a modular way.</p>
<p>You can define an aspect service using the @AdapterService annotation (see
-<a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/AdapterService.html">@AdapterService javadoc</a>).</p>
+<a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/AdapterService.html">@AdapterService javadoc</a>).</p>
<p>Here, the AdapterService is registered into the OSGI registry each time an AdapteeService is
found from the registry. </p>
<div class="codehilite"><pre><span class="kd">interface</span> <span class="nc">AdapteeService</span> <span class="o">{</span>
@@ -435,7 +435,7 @@ The AdapterService will also have the fo
<p>Bundle adapters are similar to Adapter Components, but instead of adapting a service, they adapt a bundle
with a certain set of states (STARTED|INSTALLED|...), and provide a service on top of it.</p>
<p>You can define a bundle adapter service using the @BundleAdapterService annotation (see
-<a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/BundleAdapterService.html">@BundleAdapterService javadoc</a>).</p>
+<a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/BundleAdapterService.html">@BundleAdapterService javadoc</a>).</p>
<p>The bundle adapter will be applied to any bundle that matches the specified bundle state mask and
filter conditions, which may match some of the bundle OSGi manifest headers. For each matching bundle an
adapter will be created based on the adapter implementation class. The adapter will be registered with the
@@ -472,26 +472,26 @@ DM Runtime bundle (org.apache.felix.dm.r
includes the invocation of the following lifecycle method callbacks on the service implementation:</p>
<ul>
<li>
-<p><a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/Init.html">@Init</a>:
+<p><a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/Init.html">@Init</a>:
this callback is invoked after all required dependencies have been injected. In this method, you can
yet add more dynamic dependencies using the DM API, or you can possibly configure other dependencies filter and required flags
(see <a href="## Dynamic dependency configuration">Dynamic dependency configuration</a>).</p>
</li>
<li>
-<p><a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/Start.html">@Start</a>:
+<p><a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/Start.html">@Start</a>:
this callback is invoked after all required dependencies added in the @Init method have been injected.</p>
</li>
<li>
-<p><a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/Registered.html">@Registered</a>:
+<p><a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/Registered.html">@Registered</a>:
this callback is invoked after the service component is registered (if the component provides a service).
The callback can takes as argument a ServiceRegistration parameter.</p>
</li>
<li>
-<p><a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/Stop.html">@Stop</a>:
+<p><a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/Stop.html">@Stop</a>:
this method is called when a required dependency is lost or when the bundle is stopped</p>
</li>
<li>
-<p><a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/Destroy.html">@Destoy</a> annotations:
+<p><a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/Destroy.html">@Destoy</a> annotations:
the component is about to be destroyed</p>
</li>
</ul>
@@ -505,7 +505,7 @@ available:</p>
<li>inject all optional dependencies defined on class fields, possibly with a <em>NullObject</em> if the
dependency is not available.</li>
<li>call the component init method (annotated with <em>@Init</em>, see (see
-<a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/Init.html">@Init javadoc</a>).).
+<a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/Init.html">@Init javadoc</a>).).
In the init method, you are yet allowed to add some additional dependencies using the Dependency
Manager API or DM Lambda). Alternatively, you can also configure some dependencies dynamically
(explained later, in <a href="##dynamic-dependency-configuration">Dynamic Dependency Configuration</a>.</li>
@@ -514,7 +514,7 @@ Manager API or DM Lambda). Alternatively
required dependencies are available:</p>
<ul>
<li>inject extra required dependencies (if some were defined in init() method).</li>
-<li>invoke the start method annotated with <a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/Start.html">@Start annotation</a>.
+<li>invoke the start method annotated with <a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/Start.html">@Start annotation</a>.
The start method may return a Map<String, Object> that will
be appended to the provided service properties (the the component provides a service).</li>
<li>start tracking optional dependencies applied on method callbacks (invoke optional dependency callbacks).
@@ -523,7 +523,7 @@ In other words, if the dependency is not
If you need the NullObject pattern, then apply optional dependencies on class fields, not on
callback methods. </li>
<li>register the OSGi service, if the component provides one. </li>
-<li>invoke the method annotatated with <a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/Registered.html">@Registered annotation</a>.
+<li>invoke the method annotatated with <a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/Registered.html">@Registered annotation</a>.
The method, if declared, takes as argument a <code>ServiceRegistration</code> which corresponds to the registered service.</li>
</ul>
<h2 id="component-deactivation">Component deactivation<a class="headerlink" href="#component-deactivation" title="Permanent link">¶</a></h2>
@@ -598,7 +598,7 @@ for the provided service:</p>
is automatically registered into the OSGi registry, after the @Start method returns.
But it is sometimes required to control when the service is really started/published or<br />
unpublished/stopped.</p>
-<p>This can be done using the <a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/LifecycleController.html">@LifecycleController</a> annotation.
+<p>This can be done using the <a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/LifecycleController.html">@LifecycleController</a> annotation.
This annotation injects a Runnable object that can be invoked when you want to trigger your service
startup and publication. The @LifecycleController is like a required dependency and is injected before
the @Init method is called.</p>
@@ -680,7 +680,7 @@ full control of when your component is <
<h1 id="dependencies">Dependencies<a class="headerlink" href="#dependencies" title="Permanent link">¶</a></h1>
<h2 id="service-dependencies">Service dependencies<a class="headerlink" href="#service-dependencies" title="Permanent link">¶</a></h2>
-<p>Service Dependencies can be defined using the <a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/ServiceDependency.html">@ServiceDependency</a> annotation.</p>
+<p>Service Dependencies can be defined using the <a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/ServiceDependency.html">@ServiceDependency</a> annotation.</p>
<p>Dependencies can either be required or optional. Required dependencies need to be resolved before
the service can even become active. Optional dependencies can appear and disappear while the service
is active. <strong>Please notice that, unlike with the DM API, service dependencies are required by default.</strong></p>
@@ -971,7 +971,7 @@ availability.</p>
<h2 id="configuration-dependencies">Configuration dependencies<a class="headerlink" href="#configuration-dependencies" title="Permanent link">¶</a></h2>
<p>A configuration dependency is required by default, and allows you to depend on
the availability of a valid configuration for your component. Use the
-<a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/ConfigurationDependency.html">@ConfigurationDependency annotation</a> to define a configuration dependency.</p>
+<a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/ConfigurationDependency.html">@ConfigurationDependency annotation</a> to define a configuration dependency.</p>
<p>This dependency requires the OSGi Configuration Admin Service.
Configuration Dependency callback is always invoked before any service dependency
callbacks, and before init/start callbacks.
@@ -1106,7 +1106,7 @@ the following rules are applied:</p>
You can also use a filter condition that is matched against all manifest entries.
When applied on a class field, optional unavailable dependencies are injected with a
NullObject.</p>
-<p>Use the <a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/BundleDependency.html">@BundleDependency annotation</a> to define a bundle dependency.</p>
+<p>Use the <a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r13/org/apache/felix/dm/annotation/api/BundleDependency.html">@BundleDependency annotation</a> to define a bundle dependency.</p>
<p>Attributes:</p>
<ul>
<li>changed: Returns the callback method to be invoked when the service have changed.</li>
@@ -1651,7 +1651,7 @@ in the following, the service properties
<span class="o">}</span>
</pre></div>
<div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
- Rev. 1844539 by pderop on Mon, 22 Oct 2018 09:23:25 +0000
+ Rev. 1844588 by pderop on Mon, 22 Oct 2018 17:15:59 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project