| <!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_191) on Sun Dec 23 12:06:06 CET 2018 --> |
| <title>ConfigurationDependency</title> |
| <meta name="date" content="2018-12-23"> |
| <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="ConfigurationDependency"; |
| } |
| } |
| 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}; |
| 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/ComponentStateListener.html" title="interface in org.apache.felix.dm"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/felix/dm/Dependency.html" title="interface in org.apache.felix.dm"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/felix/dm/ConfigurationDependency.html" target="_top">Frames</a></li> |
| <li><a href="ConfigurationDependency.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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</div> |
| <h2 title="Interface ConfigurationDependency" class="title">Interface ConfigurationDependency</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/ComponentDependencyDeclaration.html" title="interface in org.apache.felix.dm">ComponentDependencyDeclaration</a>, <a href="../../../../org/apache/felix/dm/Dependency.html" title="interface in org.apache.felix.dm">Dependency</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">ConfigurationDependency</span> |
| extends <a href="../../../../org/apache/felix/dm/Dependency.html" title="interface in org.apache.felix.dm">Dependency</a>, <a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html" title="interface in org.apache.felix.dm">ComponentDependencyDeclaration</a></pre> |
| <div class="block">Configuration dependency that can track the availability of a (valid) configuration. To use |
| it, specify a PID for the configuration. The dependency is required by default. If you define |
| an optional configuration dependency, the updated callback will be invoked with an empty Dictionary, |
| or with a type-safe configuration (which in this case can provide some default methods that you can |
| use to inialize your component). |
| <p> |
| Also, only managed services are supported, not factories. If you need support for factories, then |
| you can use |
| <a href="../../../../org/apache/felix/dm/compat/DependencyManagerCompat.html#createFactoryConfigurationAdapterService-java.lang.String-java.lang.String-boolean-"><code>DependencyManagerCompat.createFactoryConfigurationAdapterService(String, String, boolean)</code></a>. |
| There are a couple of things you need to be aware of when implementing the |
| <code>updated(Dictionary)</code> method:<p> |
| <ul> |
| <li>Make sure it throws a <code>ConfigurationException</code> or any other exception when you |
| get a configuration that is invalid. In this case, the dependency will not change: |
| if it was not available, it will still not be. If it was available, it will remain available |
| and implicitly assume you keep working with your old configuration.</li> |
| <li>This method will be called before all required dependencies are available. Make sure you |
| do not depend on these to parse your settings.</li> |
| <li>When the configuration is lost, updated callback is invoked with a null dictionary parameter, |
| and then the component stop lifecycle callback is invoked. |
| <li>When the DM component is stopped, then updated(null) is not invoked. |
| </ul> |
| |
| <p> The callback invoked when a configuration dependency is updated can supports the following signatures:<p> |
| <ul> |
| <li>callback(Dictionary) |
| <li>callback(Component, Dictionary) |
| <li>callback(Component, Configuration ... configTypes) // type safe configuration interface(s) |
| <li>callback(Configuration ... configTypes) // type safe configuration interface(s) |
| <li>callback(Dictionary, Configuration ... configTypes) // type safe configuration interfaces(s) |
| <li>callback(Component, Dictionary, Configuration ... configTypes) // type safe configuration interfaces(s) |
| </ul> |
| |
| <p> Support for a custom Configuration type is 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" => "a", "arr.1" => "b", "arr.2" => "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" => "{key1.value1, key2.value2}"</code></pre> |
| |
| and a dictionary with <p> |
| |
| <pre><code> "map.key1" => "value1", "map2.key2" => "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> |
| 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></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.felix.dm.ComponentDependencyDeclaration"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from interface org.apache.felix.dm.<a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html" title="interface in org.apache.felix.dm">ComponentDependencyDeclaration</a></h3> |
| <code><a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html#STATE_AVAILABLE_OPTIONAL">STATE_AVAILABLE_OPTIONAL</a>, <a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html#STATE_AVAILABLE_REQUIRED">STATE_AVAILABLE_REQUIRED</a>, <a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html#STATE_NAMES">STATE_NAMES</a>, <a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html#STATE_OPTIONAL">STATE_OPTIONAL</a>, <a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html#STATE_REQUIRED">STATE_REQUIRED</a>, <a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html#STATE_UNAVAILABLE_OPTIONAL">STATE_UNAVAILABLE_OPTIONAL</a>, <a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html#STATE_UNAVAILABLE_REQUIRED">STATE_UNAVAILABLE_REQUIRED</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========== 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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </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/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#add-org.apache.felix.dm.PropertyMetaData-">add</a></span>(<a href="../../../../org/apache/felix/dm/PropertyMetaData.html" title="interface in org.apache.felix.dm">PropertyMetaData</a> properties)</code> |
| <div class="block">Adds a MetaData regarding a given configuration property.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#needsInstance-boolean-">needsInstance</a></span>(boolean needsInstance)</code> |
| <div class="block">Specifies if the component instance should be instantiated when this dependency is started.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setCallback-java.lang.Object-java.lang.String-">setCallback</a></span>(java.lang.Object instance, |
| java.lang.String callback)</code> |
| <div class="block">Sets the name of the callback method that should be invoked when a configuration |
| is available.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setCallback-java.lang.Object-java.lang.String-boolean-">setCallback</a></span>(java.lang.Object instance, |
| java.lang.String callback, |
| boolean needsInstance)</code> |
| <div class="block">Sets the name of the callback method that should be invoked when a configuration |
| is available.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setCallback-java.lang.Object-java.lang.String-java.lang.Class-">setCallback</a></span>(java.lang.Object instance, |
| java.lang.String callback, |
| java.lang.Class<?> configType)</code> |
| <div class="block">Sets the name of the callback method that should be invoked when a configuration |
| is available.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setCallback-java.lang.Object-java.lang.String-java.lang.Class-boolean-">setCallback</a></span>(java.lang.Object instance, |
| java.lang.String callback, |
| java.lang.Class<?> configType, |
| boolean needsInstance)</code> |
| <div class="block">Sets the name of the callback method that should be invoked when a configuration |
| is available.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setCallback-java.lang.String-">setCallback</a></span>(java.lang.String callback)</code> |
| <div class="block">Sets the name of the callback method that should be invoked when a configuration |
| is available.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setCallback-java.lang.String-java.lang.Class-">setCallback</a></span>(java.lang.String callback, |
| java.lang.Class<?> configType)</code> |
| <div class="block">Sets the name of the callback method that should be invoked when a configuration |
| is available.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setConfigType-java.lang.Class...-">setConfigType</a></span>(java.lang.Class<?>... configType)</code> |
| <div class="block">Sets the configuration property type(s) that are passed to the updated callback parameters</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setDescription-java.lang.String-">setDescription</a></span>(java.lang.String description)</code> |
| <div class="block">A human readable description of the PID this configuration is associated |
| with.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setHeading-java.lang.String-">setHeading</a></span>(java.lang.String heading)</code> |
| <div class="block">The label used to display the tab name (or section) where the properties |
| are displayed.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setLocalization-java.lang.String-">setLocalization</a></span>(java.lang.String path)</code> |
| <div class="block">Points to the basename of the Properties file that can localize the Meta |
| Type informations.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setPid-java.lang.String-">setPid</a></span>(java.lang.String pid)</code> |
| <div class="block">Sets the <code>service.pid</code> of the configuration you are depending on.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setPropagate-boolean-">setPropagate</a></span>(boolean propagate)</code> |
| <div class="block">Sets propagation of the configuration properties to the service |
| properties.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setPropagate-boolean-boolean-">setPropagate</a></span>(boolean propagate, |
| boolean overrideServiceProperties)</code> |
| <div class="block">Sets propagation of the configuration properties to the service |
| properties.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setRequired-boolean-">setRequired</a></span>(boolean required)</code> |
| <div class="block">Sets the required flag which determines if this configuration dependency is required or not.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.felix.dm.Dependency"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.felix.dm.<a href="../../../../org/apache/felix/dm/Dependency.html" title="interface in org.apache.felix.dm">Dependency</a></h3> |
| <code><a href="../../../../org/apache/felix/dm/Dependency.html#getAutoConfigName--">getAutoConfigName</a>, <a href="../../../../org/apache/felix/dm/Dependency.html#getProperties--">getProperties</a>, <a href="../../../../org/apache/felix/dm/Dependency.html#isAutoConfig--">isAutoConfig</a>, <a href="../../../../org/apache/felix/dm/Dependency.html#isAvailable--">isAvailable</a>, <a href="../../../../org/apache/felix/dm/Dependency.html#isPropagated--">isPropagated</a>, <a href="../../../../org/apache/felix/dm/Dependency.html#isRequired--">isRequired</a>, <a href="../../../../org/apache/felix/dm/Dependency.html#overrideServiceProperties--">overrideServiceProperties</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.felix.dm.ComponentDependencyDeclaration"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.felix.dm.<a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html" title="interface in org.apache.felix.dm">ComponentDependencyDeclaration</a></h3> |
| <code><a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html#getFilter--">getFilter</a>, <a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html#getName--">getName</a>, <a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html#getSimpleName--">getSimpleName</a>, <a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html#getState--">getState</a>, <a href="../../../../org/apache/felix/dm/ComponentDependencyDeclaration.html#getType--">getType</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="setCallback-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setCallback</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setCallback(java.lang.String callback)</pre> |
| <div class="block">Sets the name of the callback method that should be invoked when a configuration |
| is available. The contract for this method is identical to that of |
| <code>ManagedService.updated(Dictionary) throws ConfigurationException</code>. |
| By default, if this method is not called, the callback name is "updated". |
| |
| <p> The callback is invoked on the instantiated component.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>callback</code> - the name of the callback method</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setCallback-java.lang.Object-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setCallback</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setCallback(java.lang.Object instance, |
| java.lang.String callback)</pre> |
| <div class="block">Sets the name of the callback method that should be invoked when a configuration |
| is available. The contract for this method is identical to that of |
| <code>ManagedService.updated(Dictionary) throws ConfigurationException</code>. |
| |
| <p> the callback is invoked on the callback instance, and the component is not |
| yet instantiated at the time the callback is invoked.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>instance</code> - the object to invoke the callback on</dd> |
| <dd><code>callback</code> - the name of the callback method</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setCallback-java.lang.Object-java.lang.String-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setCallback</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setCallback(java.lang.Object instance, |
| java.lang.String callback, |
| boolean needsInstance)</pre> |
| <div class="block">Sets the name of the callback method that should be invoked when a configuration |
| is available. The contract for this method is identical to that of |
| <code>ManagedService.updated(Dictionary) throws ConfigurationException</code>. |
| |
| <p> the callback is invoked on the callback instance, and if <code>needsInstance</code> is true, |
| the component is instantiated at the time the callback is invoked</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>instance</code> - the object to invoke the callback on.</dd> |
| <dd><code>callback</code> - the name of the callback method</dd> |
| <dd><code>needsInstance</code> - true if the component must be instantiated before the callback is invoked on the callback instance.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setCallback-java.lang.String-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setCallback</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setCallback(java.lang.String callback, |
| java.lang.Class<?> configType)</pre> |
| <div class="block">Sets the name of the callback method that should be invoked when a configuration |
| is available. The contract for this method is identical to that of |
| <code>ManagedService.updated(Dictionary) throws ConfigurationException</code> with the difference that |
| instead of a Dictionary it accepts an interface of the given configuration type.<br> |
| By default, the pid is assumed to match the fqdn of the configuration type. |
| |
| <p>The callback is invoked on the instantiated component.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>callback</code> - the name of the callback method</dd> |
| <dd><code>configType</code> - the configuration type that the callback method accepts.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setCallback-java.lang.Object-java.lang.String-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setCallback</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setCallback(java.lang.Object instance, |
| java.lang.String callback, |
| java.lang.Class<?> configType)</pre> |
| <div class="block">Sets the name of the callback method that should be invoked when a configuration |
| is available. The contract for this method is identical to that of |
| <code>ManagedService.updated(Dictionary) throws ConfigurationException</code> with the difference that |
| instead of a Dictionary it accepts an interface of the given configuration type.<br> |
| |
| <p> The callback is invoked on the callback instance, and at this point the component is not yet instantiated.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>instance</code> - the object to invoke the callback on.</dd> |
| <dd><code>callback</code> - the name of the callback method</dd> |
| <dd><code>configType</code> - the configuration type that the callback method accepts.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setCallback-java.lang.Object-java.lang.String-java.lang.Class-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setCallback</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setCallback(java.lang.Object instance, |
| java.lang.String callback, |
| java.lang.Class<?> configType, |
| boolean needsInstance)</pre> |
| <div class="block">Sets the name of the callback method that should be invoked when a configuration |
| is available. The contract for this method is identical to that of |
| <code>ManagedService.updated(Dictionary) throws ConfigurationException</code> with the difference that |
| instead of a Dictionary it accepts an interface of the given configuration type.<br> |
| |
| <p> the callback is invoked on the callback instance, and if <code>needsInstance</code> is true, |
| the component is instantiated at the time the callback is invoked</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>instance</code> - the object to invoke the callback on.</dd> |
| <dd><code>callback</code> - the name of the callback method</dd> |
| <dd><code>configType</code> - the configuration type that the callback method accepts.</dd> |
| <dd><code>needsInstance</code> - true if the component must be instantiated before the callback is invoked on the callback instance.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPid-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPid</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setPid(java.lang.String pid)</pre> |
| <div class="block">Sets the <code>service.pid</code> of the configuration you are depending on.</div> |
| </li> |
| </ul> |
| <a name="setPropagate-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPropagate</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setPropagate(boolean propagate)</pre> |
| <div class="block">Sets propagation of the configuration properties to the service |
| properties. Any additional service properties specified directly are |
| merged with these. Configuration properties are not propagated by default. |
| When configuration is propagated, component service properties won't be overriden by configuration properties having the same name, |
| unless you invoke <code>setPropagate(true, false)</code> method.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>propagate</code> - true if configuration properties should be propagated to the component service properties. Configuration |
| starting with a dot won't be propagated (because such property is considered as private, see Configuration Admin spec).</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html#setPropagate-boolean-boolean-"><code>setPropagate(boolean, boolean)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPropagate-boolean-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPropagate</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setPropagate(boolean propagate, |
| boolean overrideServiceProperties)</pre> |
| <div class="block">Sets propagation of the configuration properties to the service |
| properties. Any additional service properties specified directly are |
| merged with these. Configuration properties are not propagated by default.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>propagate</code> - true if the configuration properties must be propagated to the component service properties. Configuration |
| starting with a dot won't be propagated (because such property is considered as private, see Configuration Admin spec).</dd> |
| <dd><code>overrideServiceProperties</code> - true if propagated configuration properties should override the component service properties |
| having the same property name</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setHeading-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setHeading</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setHeading(java.lang.String heading)</pre> |
| <div class="block">The label used to display the tab name (or section) where the properties |
| are displayed. Example: "Printer Service".</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The label used to display the tab name where the properties are |
| displayed (may be localized)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setDescription-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDescription</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setDescription(java.lang.String description)</pre> |
| <div class="block">A human readable description of the PID this configuration is associated |
| with. Example: "Configuration for the PrinterService bundle".</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A human readable description of the PID this configuration is |
| associated with (may be localized)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setLocalization-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setLocalization</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setLocalization(java.lang.String path)</pre> |
| <div class="block">Points to the basename of the Properties file that can localize the Meta |
| Type informations. The default localization base name for the properties |
| is OSGI-INF/l10n/bundle, but can be overridden by the manifest |
| Bundle-Localization header (see core specification, in section |
| Localization on page 68). You can specify a specific localization |
| basename file using this method (e.g. |
| <code>setLocalization("person")</code> will match person_du_NL.properties |
| in the root bundle directory.</div> |
| </li> |
| </ul> |
| <a name="add-org.apache.felix.dm.PropertyMetaData-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>add</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> add(<a href="../../../../org/apache/felix/dm/PropertyMetaData.html" title="interface in org.apache.felix.dm">PropertyMetaData</a> properties)</pre> |
| <div class="block">Adds a MetaData regarding a given configuration property.</div> |
| </li> |
| </ul> |
| <a name="setRequired-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setRequired</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setRequired(boolean 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="needsInstance-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>needsInstance</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> needsInstance(boolean needsInstance)</pre> |
| <div class="block">Specifies if the component instance should be instantiated when this dependency is started. |
| The component is always instantiated when a Configuration dependency is defined, except |
| if you set a callback instance or if you invoke this method with <code>false</code></div> |
| </li> |
| </ul> |
| <a name="setConfigType-java.lang.Class...-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>setConfigType</h4> |
| <pre><a href="../../../../org/apache/felix/dm/ConfigurationDependency.html" title="interface in org.apache.felix.dm">ConfigurationDependency</a> setConfigType(java.lang.Class<?>... configType)</pre> |
| <div class="block">Sets the configuration property type(s) that are passed to the updated callback parameters</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>configType</code> - the configuration type(s) that the callback method accepts.</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/ComponentStateListener.html" title="interface in org.apache.felix.dm"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/felix/dm/Dependency.html" title="interface in org.apache.felix.dm"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/felix/dm/ConfigurationDependency.html" target="_top">Frames</a></li> |
| <li><a href="ConfigurationDependency.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |