blob: fef729d2a57bfd48e1cd0664592ce44695415654 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_172) on Mon Oct 22 18:39:56 CEST 2018 -->
<title>ConfigurationDependencyBuilder</title>
<meta name="date" content="2018-10-22">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ConfigurationDependencyBuilder";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/felix/dm/lambda/ComponentBuilder.html" title="interface in org.apache.felix.dm.lambda"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/felix/dm/lambda/DependencyBuilder.html" title="interface in org.apache.felix.dm.lambda"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" target="_top">Frames</a></li>
<li><a href="ConfigurationDependencyBuilder.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.felix.dm.lambda</div>
<h2 title="Interface ConfigurationDependencyBuilder" class="title">Interface ConfigurationDependencyBuilder</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../../../org/apache/felix/dm/lambda/DependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">DependencyBuilder</a>&lt;ConfigurationDependency&gt;</dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">ConfigurationDependencyBuilder</span>
extends <a href="../../../../../org/apache/felix/dm/lambda/DependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">DependencyBuilder</a>&lt;ConfigurationDependency&gt;</pre>
<div class="block">Builds a Dependency Manager Configuration Dependency.
(configuration dependencies are required by default).
Two families of callbacks are supported: <p>
<ul>
<li>reflection based callbacks: you specify a callback method name
<li>method reference callbacks: you specify a java8 method reference
</ul>
<p> Callbacks may accept a Dictionary, a Component, or a user defined configuration type interface.
If you only specify a pid, by default the callback method name is assumed to be "updated".
<p> Configuration types are a new feature that allows you to specify an interface that is implemented
by DM and such interface is then injected to your callback instead of the actual Dictionary.
Using such configuration interface provides a way for creating type-safe configurations from a actual <code>Dictionary</code> that is
normally injected by Dependency Manager.
The callback accepts in argument an interface that you have to provide, and DM will inject a proxy that converts
method calls from your configuration-type to lookups in the actual map or dictionary. The results of these lookups are then
converted to the expected return type of the invoked configuration method.<br>
As proxies are injected, no implementations of the desired configuration-type are necessary!
</p>
<p>
The lookups performed are based on the name of the method called on the configuration type. The method names are
"mangled" to the following form: <tt>[lower case letter] [any valid character]*</tt>. Method names starting with
<tt>get</tt> or <tt>is</tt> (JavaBean convention) are stripped from these prefixes. For example: given a dictionary
with the key <tt>"foo"</tt> can be accessed from a configuration-type using the following method names:
<tt>foo()</tt>, <tt>getFoo()</tt> and <tt>isFoo()</tt>.<p>
If the property contains a dot (which is invalid in java method names), then dots (".") can be converted using the following conventions:
<ul>
<li> if the method name follows the javabean convention and/or kamel casing convention, then each capital letter is assumed to map to a "dot",
followed by the same letter in lower case. This means only lower case properties are
supported in this case. Example: getFooBar() or fooBar() will map to "foo.bar" property.
<li> else, if the method name follows the standard OSGi metatype specification, then dots
are encoded as "_"; and "_" is encoded as "__". (see OSGi r6 compendium, chapter 105.9.2).
Example: "foo_BAR()" is mapped to "foo.BAR" property; "foo__BAR_zoo()" is mapped to "foo_BAR.zoo" property.
</ul>
<p>
The return values supported are: primitive types (or their object wrappers), strings, enums, arrays of
primitives/strings, <code>Collection</code> types, <code>Map</code> types, <code>Class</code>es and interfaces. When an interface is
returned, it is treated equally to a configuration type, that is, it is returned as a proxy.
</p>
<p>
Arrays can be represented either as comma-separated values, optionally enclosed in square brackets. For example:
<tt>[ a, b, c ]</tt> and <tt>a, b,c</tt> are both considered an array of length 3 with the values "a", "b" and "c".
Alternatively, you can append the array index to the key in the dictionary to obtain the same: a dictionary with
"arr.0" =&gt; "a", "arr.1" =&gt; "b", "arr.2" =&gt; "c" would result in the same array as the earlier examples.
</p>
<p>
Maps can be represented as single string values similarly as arrays, each value consisting of both the key and value
separated by a dot. Optionally, the value can be enclosed in curly brackets. Similar to array, you can use the same
dot notation using the keys. For example, a dictionary with
<pre><code> "map" =&gt; "{key1.value1, key2.value2}"</code></pre>
and a dictionary with <p>
<pre><code> "map.key1" =&gt; "value1", "map2.key2" =&gt; "value2"</code></pre>
result in the same map being returned.
Instead of a map, you could also define an interface with the methods <tt>getKey1()</tt> and <tt>getKey2</tt> and use
that interface as return type instead of a <code>Map</code>.
</p>
<p>
In case a lookup does not yield a value from the underlying map or dictionary, the following rules are applied:
<ol>
<li>primitive types yield their default value, as defined by the Java Specification;
<li>string, <code>Class</code>es and enum values yield <code>null</code>;
<li>for arrays, collections and maps, an empty array/collection/map is returned;
<li>for other interface types that are treated as configuration type a null-object is returned.
</ol>
</p>
<b> Sample codes: </b>
<p> Code example with a component that defines a Configuration Dependency using a specific callback method reference,
and the method accepts in argument a configuration type (the pid is assumed to be the fqdn of the configuration type):
<pre> <code>
public class Activator extends DependencyManagerActivator {
public void init(BundleContext ctx, DependencyManager dm) throws Exception {
component(comp -&gt; comp
.impl(ServiceImpl.class)
.withCnf(conf -&gt; conf.update(MyConfig.class, ServiceImpl::modified)));
}
}
</code></pre>
<p> Code example with a component that defines a Configuration Dependency using a specific callback method reference
which accepts a Dictionary in argument:
<pre> <code>
public class Activator extends DependencyManagerActivator {
public void init(BundleContext ctx, DependencyManager dm) throws Exception {
component(comp -&gt; comp
.impl(ServiceImpl.class)
.withCnf(conf -&gt; conf.pid("my.pid").update(ServiceImpl::modified)));
}
}
</code></pre>
<p> Code example which defines a configuration dependency injected in the "ServiceImpl.updated(Dictionary)" callback:
<pre> <code>
public class Activator extends DependencyManagerActivator {
public void init(BundleContext ctx, DependencyManager dm) throws Exception {
component(comp -&gt; comp.impl(ServiceImpl.class).withCnf("my.pid"));
}
}
</code></pre>
<p> Code example with a component that defines a Configuration Dependency using a specific callback method name:
<pre> <code>
public class Activator extends DependencyManagerActivator {
public void init(BundleContext ctx, DependencyManager dm) throws Exception {
component(comp -&gt; comp.impl(ServiceImpl.class).withCnf(conf -&gt; conf.pid("my.pid").update("modified")));
}
}
</code></pre></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#optional--">optional</a></span>()</code>
<div class="block">Sets the dependency as optional.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#pid-java.lang.String-">pid</a></span>(java.lang.String&nbsp;pid)</code>
<div class="block">Sets the pid for this configuration dependency.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#propagate--">propagate</a></span>()</code>
<div class="block">Sets propagation of the configuration to the service properties (false by default).</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#propagate-boolean-">propagate</a></span>(boolean&nbsp;propagate)</code>
<div class="block">Sets propagation of the configuration properties to the service properties (false by default).</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#required--">required</a></span>()</code>
<div class="block">Sets the dependency as required.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#required-boolean-">required</a></span>(boolean&nbsp;required)</code>
<div class="block">Sets the required flag which determines if this configuration dependency is required or not.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#update-org.apache.felix.dm.lambda.callbacks.CbDictionary-">update</a></span>(<a href="../../../../../org/apache/felix/dm/lambda/callbacks/CbDictionary.html" title="interface in org.apache.felix.dm.lambda.callbacks">CbDictionary</a>&lt;T&gt;&nbsp;callback)</code>
<div class="block">Sets a reference to a "callback(Dictionary)" method from one of the component implementation classes.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#update-org.apache.felix.dm.lambda.callbacks.CbDictionaryComponent-">update</a></span>(<a href="../../../../../org/apache/felix/dm/lambda/callbacks/CbDictionaryComponent.html" title="interface in org.apache.felix.dm.lambda.callbacks">CbDictionaryComponent</a>&lt;T&gt;&nbsp;callback)</code>
<div class="block">Sets a reference to a "callback(Dictionary, Component)" method from one of the component implementation classes.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#update-java.lang.Class-java.lang.Object-java.lang.String-">update</a></span>(java.lang.Class&lt;?&gt;&nbsp;configType,
java.lang.Object&nbsp;callbackInstance,
java.lang.String&nbsp;updateMethod)</code>
<div class="block">Sets a callback method to call on a given Object instance when the configuration is updated.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#update-java.lang.Class-java.lang.String-">update</a></span>(java.lang.Class&lt;?&gt;&nbsp;configType,
java.lang.String&nbsp;updateMethod)</code>
<div class="block">Sets a callback method to call on the component implementation class(es) when the configuration is updated.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#update-java.lang.Class-org.apache.felix.dm.lambda.callbacks.InstanceCbConfiguration-">update</a></span>(java.lang.Class&lt;T&gt;&nbsp;configType,
<a href="../../../../../org/apache/felix/dm/lambda/callbacks/InstanceCbConfiguration.html" title="interface in org.apache.felix.dm.lambda.callbacks">InstanceCbConfiguration</a>&lt;T&gt;&nbsp;updated)</code>
<div class="block">Sets a reference to a "callback(Configuration)" method from an Object instance.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#update-java.lang.Class-org.apache.felix.dm.lambda.callbacks.InstanceCbConfigurationComponent-">update</a></span>(java.lang.Class&lt;T&gt;&nbsp;configType,
<a href="../../../../../org/apache/felix/dm/lambda/callbacks/InstanceCbConfigurationComponent.html" title="interface in org.apache.felix.dm.lambda.callbacks">InstanceCbConfigurationComponent</a>&lt;T&gt;&nbsp;updated)</code>
<div class="block">Sets a reference to a "callback(Configuration, Component)" method from an Object instance.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>&lt;T,U&gt;&nbsp;<a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#update-java.lang.Class-org.apache.felix.dm.lambda.callbacks.CbConfiguration-">update</a></span>(java.lang.Class&lt;U&gt;&nbsp;configType,
<a href="../../../../../org/apache/felix/dm/lambda/callbacks/CbConfiguration.html" title="interface in org.apache.felix.dm.lambda.callbacks">CbConfiguration</a>&lt;T,U&gt;&nbsp;callback)</code>
<div class="block">Sets a reference to a "callback(Configuration)" method from one of the component implementation classes.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>&lt;T,U&gt;&nbsp;<a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#update-java.lang.Class-org.apache.felix.dm.lambda.callbacks.CbConfigurationComponent-">update</a></span>(java.lang.Class&lt;U&gt;&nbsp;configType,
<a href="../../../../../org/apache/felix/dm/lambda/callbacks/CbConfigurationComponent.html" title="interface in org.apache.felix.dm.lambda.callbacks">CbConfigurationComponent</a>&lt;T,U&gt;&nbsp;callback)</code>
<div class="block">Sets a reference to a "callback(Configuration, Component)" method from one of the component implementation classes.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#update-org.apache.felix.dm.lambda.callbacks.InstanceCbDictionary-">update</a></span>(<a href="../../../../../org/apache/felix/dm/lambda/callbacks/InstanceCbDictionary.html" title="interface in org.apache.felix.dm.lambda.callbacks">InstanceCbDictionary</a>&nbsp;callback)</code>
<div class="block">Sets a reference to a "callback(Dictionary)" method from an Object instance.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#update-org.apache.felix.dm.lambda.callbacks.InstanceCbDictionaryComponent-">update</a></span>(<a href="../../../../../org/apache/felix/dm/lambda/callbacks/InstanceCbDictionaryComponent.html" title="interface in org.apache.felix.dm.lambda.callbacks">InstanceCbDictionaryComponent</a>&nbsp;callback)</code>
<div class="block">Sets a reference to a "callback(Dictionary, Component)" method from an Object instance.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#update-java.lang.Object-java.lang.String-">update</a></span>(java.lang.Object&nbsp;callbackInstance,
java.lang.String&nbsp;updateMethod)</code>
<div class="block">Sets a callback method to call on a given Object instance when the configuration is updated.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html#update-java.lang.String-">update</a></span>(java.lang.String&nbsp;updateMethod)</code>
<div class="block">Sets a callback method to call on the component implementation class(es) when the configuration is updated.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.felix.dm.lambda.DependencyBuilder">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.felix.dm.lambda.<a href="../../../../../org/apache/felix/dm/lambda/DependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">DependencyBuilder</a></h3>
<code><a href="../../../../../org/apache/felix/dm/lambda/DependencyBuilder.html#build--">build</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="required-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>required</h4>
<pre><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;required(boolean&nbsp;required)</pre>
<div class="block">Sets the required flag which determines if this configuration dependency is required or not.
A configuration dependency is required by default.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>required</code> - the required flag</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this service dependency</dd>
</dl>
</li>
</ul>
<a name="required--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>required</h4>
<pre><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;required()</pre>
<div class="block">Sets the dependency as required. A configuration dependency is required by default.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this service dependency</dd>
</dl>
</li>
</ul>
<a name="optional--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>optional</h4>
<pre><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;optional()</pre>
<div class="block">Sets the dependency as optional. A configuration dependency is required by default.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this service dependency</dd>
</dl>
</li>
</ul>
<a name="pid-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pid</h4>
<pre><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;pid(java.lang.String&nbsp;pid)</pre>
<div class="block">Sets the pid for this configuration dependency.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pid</code> - the configuration dependency pid.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="propagate--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>propagate</h4>
<pre><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;propagate()</pre>
<div class="block">Sets propagation of the configuration to the service properties (false by default).
All public configuration properties (not starting with a dot) will be propagated to the component service properties.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="propagate-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>propagate</h4>
<pre><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;propagate(boolean&nbsp;propagate)</pre>
<div class="block">Sets propagation of the configuration properties to the service properties (false by default).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>propagate</code> - true if all public configuration properties (not starting with a dot) must be propagated to the component service properties (false by default)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="update-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;update(java.lang.String&nbsp;updateMethod)</pre>
<div class="block">Sets a callback method to call on the component implementation class(es) when the configuration is updated. When the configuration is lost, the callback is invoked
with a null dictionary.
<p>The following callback signatures are supported and searched in the following order:
<ol>
<li>method(Dictionary)</li>
<li>method(Component, Dictionary)</li>
</ol></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>updateMethod</code> - the name of the callback</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="update-java.lang.Class-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;update(java.lang.Class&lt;?&gt;&nbsp;configType,
java.lang.String&nbsp;updateMethod)</pre>
<div class="block">Sets a callback method to call on the component implementation class(es) when the configuration is updated. The callback is invoked with a configuration type
argument (null if the configuration is lost).
<p>The following callback signatures are supported and searched in the following order:
<ol>
<li>method(Dictionary)</li>
<li>method(Component, Dictionary)</li>
<li>method(Configuration) // same type as the one specified in the "configType" argument</li>
<li>method(Component, Configuration) // Configuration has the same type as the one specified in the "configType" argument</li>
</ol></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>configType</code> - the type of a configuration that is passed as argument to the callback</dd>
<dd><code>updateMethod</code> - the callback to call on the component implementation class(es) when the configuration is updated.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="update-java.lang.Object-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;update(java.lang.Object&nbsp;callbackInstance,
java.lang.String&nbsp;updateMethod)</pre>
<div class="block">Sets a callback method to call on a given Object instance when the configuration is updated.
When the updated method is invoked, the Component implementation is not yet instantiated. This method
can be typically used by a Factory object which needs the configuration before it can create the actual
component implementation instance(s).
When the configuration is lost, the callback is invoked with a null dictionary, and the following signatures are supported:
<ol>
<li>method(Dictionary)</li>
<li>method(Component, Dictionary)</li>
</ol></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callbackInstance</code> - the object instance on which the updatedMethod is invoked</dd>
<dd><code>updateMethod</code> - the callback to call on the callbackInstance when the configuration is updated.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="update-java.lang.Class-java.lang.Object-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;update(java.lang.Class&lt;?&gt;&nbsp;configType,
java.lang.Object&nbsp;callbackInstance,
java.lang.String&nbsp;updateMethod)</pre>
<div class="block">Sets a callback method to call on a given Object instance when the configuration is updated.
When the updated method is invoked, the Component implementation is not yet instantiated. This method
can be typically used by a Factory object which needs the configuration before it can create the actual
component implementation instance(s).
The callback is invoked with a configuration type argument (null of the configuration is lost).
<p>The following callback signatures are supported and searched in the following order:
<ol>
<li>method(Dictionary)</li>
<li>method(Component, Dictionary)</li>
<li>method(Configuration) // same type as the one specified in the "configType" argument</li>
<li>method(Component, Configuration) // Configuration has the same type as the one specified in the "configType" argument</li>
</ol></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>configType</code> - the type of a configuration that is passed as argument to the callback</dd>
<dd><code>callbackInstance</code> - the object instance on which the updatedMethod is invoked</dd>
<dd><code>updateMethod</code> - the callback to call on the callbackInstance when the configuration is updated.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="update-org.apache.felix.dm.lambda.callbacks.CbDictionary-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre>&lt;T&gt;&nbsp;<a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;update(<a href="../../../../../org/apache/felix/dm/lambda/callbacks/CbDictionary.html" title="interface in org.apache.felix.dm.lambda.callbacks">CbDictionary</a>&lt;T&gt;&nbsp;callback)</pre>
<div class="block">Sets a reference to a "callback(Dictionary)" method from one of the component implementation classes.
The method is invoked with a Dictionary argument (which is null if the configuration is lost).</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type of the target component implementation class on which the method is invoked</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callback</code> - a reference to a method of one of the component implementation classes.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="update-org.apache.felix.dm.lambda.callbacks.CbDictionaryComponent-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre>&lt;T&gt;&nbsp;<a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;update(<a href="../../../../../org/apache/felix/dm/lambda/callbacks/CbDictionaryComponent.html" title="interface in org.apache.felix.dm.lambda.callbacks">CbDictionaryComponent</a>&lt;T&gt;&nbsp;callback)</pre>
<div class="block">Sets a reference to a "callback(Dictionary, Component)" method from one of the component implementation classes.
The method is invoked with Dictionary/Component arguments. When the configuration is lost, the Dictionary argument
is null.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type of the target component implementation class on which the method is invoked</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callback</code> - a reference to a method callback defined in one of the the component implementation classes.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="update-java.lang.Class-org.apache.felix.dm.lambda.callbacks.CbConfiguration-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre>&lt;T,U&gt;&nbsp;<a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;update(java.lang.Class&lt;U&gt;&nbsp;configType,
<a href="../../../../../org/apache/felix/dm/lambda/callbacks/CbConfiguration.html" title="interface in org.apache.felix.dm.lambda.callbacks">CbConfiguration</a>&lt;T,U&gt;&nbsp;callback)</pre>
<div class="block">Sets a reference to a "callback(Configuration)" method from one of the component implementation classes.
The method is invoked with a configuration type argument (null if the configuration is lost).</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type of the target component implementation class on which the method is invoked</dd>
<dd><code>U</code> - the type of the configuration interface accepted by the callback method.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>configType</code> - the type of a configuration that is passed as argument to the callback</dd>
<dd><code>callback</code> - the callback method reference which must point to a method from one of the component implementation classes. The method
takes as argument an interface which will be implemented by a dynamic proxy that wraps the actual configuration properties.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="update-java.lang.Class-org.apache.felix.dm.lambda.callbacks.CbConfigurationComponent-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre>&lt;T,U&gt;&nbsp;<a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;update(java.lang.Class&lt;U&gt;&nbsp;configType,
<a href="../../../../../org/apache/felix/dm/lambda/callbacks/CbConfigurationComponent.html" title="interface in org.apache.felix.dm.lambda.callbacks">CbConfigurationComponent</a>&lt;T,U&gt;&nbsp;callback)</pre>
<div class="block">Sets a reference to a "callback(Configuration, Component)" method from one of the component implementation classes.
The method is invoked with two args: configuration type, Component. The configuration type argument is null if the configuration is lost.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type of the target component implementation class on which the method is invoked</dd>
<dd><code>U</code> - the type of the configuration interface accepted by the callback method.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>configType</code> - the type of a configuration that is passed as argument to the callback</dd>
<dd><code>callback</code> - the reference to a method from one of the component implementation classes. The method
takes as argument an interface which will be implemented by a dynamic proxy that wraps the actual configuration properties. It also
takes as the second argument a Component object.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="update-org.apache.felix.dm.lambda.callbacks.InstanceCbDictionary-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;update(<a href="../../../../../org/apache/felix/dm/lambda/callbacks/InstanceCbDictionary.html" title="interface in org.apache.felix.dm.lambda.callbacks">InstanceCbDictionary</a>&nbsp;callback)</pre>
<div class="block">Sets a reference to a "callback(Dictionary)" method from an Object instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callback</code> - a reference to an Object instance which takes as argument a Dictionary (null if the configuration is lost).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="update-org.apache.felix.dm.lambda.callbacks.InstanceCbDictionaryComponent-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre><a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;update(<a href="../../../../../org/apache/felix/dm/lambda/callbacks/InstanceCbDictionaryComponent.html" title="interface in org.apache.felix.dm.lambda.callbacks">InstanceCbDictionaryComponent</a>&nbsp;callback)</pre>
<div class="block">Sets a reference to a "callback(Dictionary, Component)" method from an Object instance. The method accepts
a Dictionary and a Component object. The passed Dictionary is null in case the configuration is lost.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callback</code> - a reference to method from an Object instance which takes as argument a Dictionary and a Component</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="update-java.lang.Class-org.apache.felix.dm.lambda.callbacks.InstanceCbConfiguration-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre>&lt;T&gt;&nbsp;<a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;update(java.lang.Class&lt;T&gt;&nbsp;configType,
<a href="../../../../../org/apache/felix/dm/lambda/callbacks/InstanceCbConfiguration.html" title="interface in org.apache.felix.dm.lambda.callbacks">InstanceCbConfiguration</a>&lt;T&gt;&nbsp;updated)</pre>
<div class="block">Sets a reference to a "callback(Configuration)" method from an Object instance. The configuration type argument is null if the configuration is lost.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the configuration interface accepted by the callback method.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>configType</code> - the class of the configuration that is passed as argument to the callback</dd>
<dd><code>updated</code> - a reference to an Object instance which takes as argument the given configuration type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a name="update-java.lang.Class-org.apache.felix.dm.lambda.callbacks.InstanceCbConfigurationComponent-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>update</h4>
<pre>&lt;T&gt;&nbsp;<a href="../../../../../org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" title="interface in org.apache.felix.dm.lambda">ConfigurationDependencyBuilder</a>&nbsp;update(java.lang.Class&lt;T&gt;&nbsp;configType,
<a href="../../../../../org/apache/felix/dm/lambda/callbacks/InstanceCbConfigurationComponent.html" title="interface in org.apache.felix.dm.lambda.callbacks">InstanceCbConfigurationComponent</a>&lt;T&gt;&nbsp;updated)</pre>
<div class="block">Sets a reference to a "callback(Configuration, Component)" method from an Object instance. The method accepts
a configuration type and a Component object. The configuration type argument is null if the configuration is lost.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the configuration interface accepted by the callback method.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>configType</code> - the class of the configuration that is passed as argument to the callback</dd>
<dd><code>updated</code> - a reference to an Object instance which takes as argument a the given configuration type, and a Component object.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/felix/dm/lambda/ComponentBuilder.html" title="interface in org.apache.felix.dm.lambda"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/felix/dm/lambda/DependencyBuilder.html" title="interface in org.apache.felix.dm.lambda"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.html" target="_top">Frames</a></li>
<li><a href="ConfigurationDependencyBuilder.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>