felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r943230 - in /websites/staging/felix/trunk/content: ./ documentation/subprojects/apache-felix-dependency-manager-4/guides/resources.html
Date Tue, 10 Mar 2015 19:27:48 GMT
Author: buildbot
Date: Tue Mar 10 19:27:47 2015
New Revision: 943230

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-4/guides/resources.html

Propchange: websites/staging/felix/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Mar 10 19:27:47 2015
@@ -1 +1 @@
-1665655
+1665657

Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/guides/resources.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/guides/resources.html
(original)
+++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/guides/resources.html
Tue Mar 10 19:27:47 2015
@@ -99,6 +99,7 @@
     <span class="n">private</span> <span class="n">Map</span><span
class="o">&lt;</span><span class="n">ServiceReference</span><span
class="p">,</span> <span class="n">ResourceHandler</span><span class="o">&gt;</span>
<span class="n">handlers</span> <span class="p">=</span> <span
class="n">new</span> <span class="n">ConcurrentHashMap</span><span
class="o">&lt;&gt;</span><span class="p">();</span>
     <span class="n">private</span> <span class="n">volatile</span>
<span class="n">BundleContext</span> <span class="n">context</span><span
class="p">;</span>
 
+    <span class="o">//</span> <span class="n">added</span> <span
class="n">callback</span>
     <span class="n">void</span> <span class="n">addHandler</span><span
class="p">(</span><span class="n">ServiceReference</span> <span class="n">ref</span><span
class="p">,</span> <span class="n">ResourceHandler</span> <span class="n">handler</span><span
class="p">)</span> <span class="p">{</span>
         <span class="n">handlers</span><span class="p">.</span><span
class="n">put</span><span class="p">(</span><span class="n">ref</span><span
class="p">,</span> <span class="n">handler</span><span class="p">);</span>
         <span class="k">if</span> <span class="p">(</span><span
class="n">ref</span><span class="p">.</span><span class="n">getProperty</span><span
class="p">(</span><span class="n">ResourceHandler</span><span class="p">.</span><span
class="n">URL</span><span class="p">)</span> !<span class="p">=</span>
<span class="n">null</span><span class="p">)</span> <span class="p">{</span>
@@ -110,6 +111,7 @@
         <span class="p">}</span>
     <span class="p">}</span>
 
+    <span class="o">//</span> <span class="n">removed</span> <span
class="n">callback</span>
     <span class="n">void</span> <span class="n">removeHandler</span><span
class="p">(</span><span class="n">ServiceReference</span> <span class="n">ref</span><span
class="p">,</span> <span class="n">ResourceHandler</span> <span class="n">handler</span><span
class="p">)</span> <span class="p">{</span>
         <span class="n">handlers</span><span class="p">.</span><span
class="n">remove</span><span class="p">(</span><span class="n">ref</span><span
class="p">);</span>
     <span class="p">}</span>
@@ -121,7 +123,7 @@
     <span class="p">}</span>
 
     <span class="p">@</span><span class="n">SuppressWarnings</span><span
class="p">(</span>&quot;<span class="n">unchecked</span>&quot;<span
class="p">)</span>
-    <span class="n">void</span> <span class="n">notifyMatchingInitialResources</span><span
class="p">(</span><span class="n">String</span> <span class="n">filter</span><span
class="p">,</span> <span class="n">ResourceHandler</span> <span class="n">handler</span><span
class="p">)</span> <span class="p">{</span>
+    <span class="n">private</span> <span class="n">void</span> <span
class="n">notifyMatchingInitialResources</span><span class="p">(</span><span
class="n">String</span> <span class="n">filter</span><span class="p">,</span>
<span class="n">ResourceHandler</span> <span class="n">handler</span><span
class="p">)</span> <span class="p">{</span>
         <span class="n">Enumeration</span><span class="o">&lt;</span><span
class="n">URL</span><span class="o">&gt;</span> <span class="n">entries</span>
<span class="p">=</span> <span class="n">context</span><span class="p">.</span><span
class="n">getBundle</span><span class="p">().</span><span class="n">findEntries</span><span
class="p">(</span>&quot;<span class="o">/</span>&quot;<span
class="p">,</span> <span class="n">filter</span><span class="p">,</span>
<span class="n">true</span><span class="p">);</span>
         <span class="k">while</span> <span class="p">(</span><span
class="n">entries</span><span class="p">.</span><span class="n">hasMoreElements</span><span
class="p">())</span> <span class="p">{</span>
             <span class="n">URL</span> <span class="n">entry</span>
<span class="p">=</span> <span class="n">entries</span><span class="p">.</span><span
class="n">nextElement</span><span class="p">();</span>
@@ -151,7 +153,7 @@
 <p>When a new handler is being added, the resource repository should inform the resource
handler on the resources it has that match the handler's filter or url. This is done by invoking
the <code>added(url, properties)</code> method on the ResourceHandler. This callback
results in the ResourceAdapter's ResourceDependency being satisfied, the url being injected
into the resource adapter implementation object and the resource adapter implementation component
being started.</p>
 <p>Besides the added() callback the resource repository is also responsible for handling
the changed() and removed() methods on change or removal of the resource from the resource
repository. For a bundle resource repository that's not likely to happen, but for a filesystem
resource repository this can very well be the case.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1665655 by uiterlix on Tue, 10 Mar 2015 19:22:51 +0000
+        Rev. 1665657 by uiterlix on Tue, 10 Mar 2015 19:27:34 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project



Mime
View raw message