felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r849204 [23/33] - in /websites/staging/felix/trunk/content: ./ documentation/subprojects/ documentation/subprojects/apache-felix-ipojo/ documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-devguide/ documentation/subprojects/apac...
Date Sun, 03 Feb 2013 06:45:22 GMT
Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/temporal-service-dependency.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/temporal-service-dependency.html (original)
+++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/temporal-service-dependency.html Sun Feb  3 06:45:21 2013
@@ -20,9 +20,45 @@
   <head>
     <title>Apache Felix - Temporal Service Dependency</title>
     <link rel="icon" href="/res/favicon.ico">
-    <link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
-    <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all">
+    <link rel="stylesheet" href="/site/media.data/site.css" type="text/css" media="all">
+    <link rel="stylesheet" href="/ipojo/site/superfish.css" type="text/css" media="all">
+    <link rel="stylesheet" href="/ipojo/site/style.css" type="text/css" media="all">
     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    
+    <!--
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shCore.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushCSharp.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushPhp.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushJScript.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushVb.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushSql.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushXml.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushShell.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushDelphi.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushPython.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushJava.js"></script>
+    -->
+    
+    <script type="text/javascript" src="/ipojo/site/jquery-1.js"></script>
+    <script type="text/javascript" src="/ipojo/site/hoverIntent.js"></script>
+    <script type="text/javascript" src="/ipojo/site/superfish.js"></script> 
+    <script type="text/javascript" src="/ipojo/site/supersubs.js"></script> 
+    
+    <script type="text/javascript"> 
+     
+        $(document).ready(function(){ 
+            $("ul.sf-menu").supersubs({ 
+                minWidth:    14,   // minimum width of sub-menus in em units 
+                maxWidth:    30,   // maximum width of sub-menus in em units 
+                extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
+                                   // due to slight rounding differences and font-family 
+            }).superfish();  // call supersubs first, then superfish, so that subs are 
+                             // not display:none when measuring. Call before initialising 
+                             // containing tabs for same reason. 
+        }); 
+     
+    </script>
+    
   </head>
   <body>
     <div class="title">
@@ -37,180 +73,274 @@
         </a>
       </div>
     </div>
+  
+    <div class="main">
+    <div class="main">
+    <div class="page-header">
+    <img src="/ipojo/site/header.png" class="header">
+    <a href="http://ipojo.org"><img src="/ipojo/site/ipojo.png" width="225" class="header-logo"></a>
+    <ul class="sf-menu sf-js-enabled sf-shadow" id="ipojo-menu">
+    <li class="current">
+    <!-- Menu Overview -->
+    <a href="#" class="sf-with-ul">Overview<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+    <ul>
+        <li>
+        <a href="">Home</a>                          
+        </li>
+        <li>
+        <a href="">Why choose iPOJO</a>
+        </li>
+        <li>
+        <a href="">Success stories</a>
+        </li>
+        <li>
+        <a href="">Features</a>
+        </li>
+    </ul>
+    </li>   
     
-    <div class="menu"> 
-      <p><a href="/news.html">news</a>  <br />
-<a href="/license.html">license</a>  <br />
-<a href="/downloads.cgi">downloads</a>  <br />
-<a href="/documentation.html">documentation</a>  <br />
-<a href="/mailinglists.html">mailing lists</a>  <br />
-<a href="/documentation/community/contributing.html">contributing</a>  <br />
-<a href="/sitemap.html">site map</a>  <br />
-<a href="http://www.apache.org/">asf</a>  <br />
-<a href="http://www.apache.org/security/">security</a>  <br />
-<a href="http://www.apache.org/foundation/sponsorship.html">sponsorship</a>  <br />
-<a href="http://www.apache.org/foundation/thanks.html">sponsors</a>  <br />
-</p>
-<iframe
-    src="http://www.apache.org/ads/button.html"
-    style="border-width:0; float: left"
-    frameborder="0"
-    scrolling="no"
-    width="135"
-    height="135">
-</iframe>
-    </div>
+    <li class="">           
+    <!-- Menu download -->
+    <li>
+    <a href="/downloads.cgi">Download </a>
+    </li>
     
-    <div class="main">
-      <div class="breadcrump" style="font-size: 80%;">
-        <a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/documentation.html">Documentation</a>&nbsp;&raquo&nbsp;<a href="/documentation/subprojects.html">Apache Felix Subproject Documentation</a>&nbsp;&raquo&nbsp;<a href="/documentation/subprojects/apache-felix-ipojo.html">Apache Felix iPOJO</a>&nbsp;&raquo&nbsp;<a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide.html">apache-felix-ipojo-userguide</a>&nbsp;&raquo&nbsp;<a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components.html">Describing components</a>
-      </div>
-
+    <li class="">                   
+    <!-- Menu Documentation -->
+    <a href="#" class="sf-with-ul">Documentation<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+    <ul>
+        <!-- sub-menu : getting started -->
+        <li class="">
+        <a href="#" class="sf-with-ul">Getting Started<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+        <ul>
+         <li><a href="">iPOJO in 10 minutes</a></li>
+         <li><a href="">Using Annotations</a></li>
+         <li><a href="">Maven tutorial</a></li>
+         <li><a href="">Advanced tutorial</a></li>
+         <li><a href="">Using Distributed OSGi</a></li>
+         <li><a href="">Application Composition</a></li>
+        </ul>
+        </li> <!-- end of getting started -->
+        <!-- sub menu : Describing Components -->
+         <li class="">
+            <a href="" class="sf-with-ul">Describing components<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+            <ul>
+            <li><a href="">Requiring a service</a></li>
+            <li><a href="">Providing a service</a></li>
+            <li><a href="">Lifecycle management</a></li>
+            <li><a href="">Configuration</a></li>
+            <li><a href="">Introspection</a></li>
+            <li><a href="">Impacting the lifecycle</a></li>
+            <li><a href="">Asynchronous communication</a></li>
+            <li><a href="">JMX management</a></li>
+            <li><a href="">Extender pattern</a></li>
+            <li><a href="">Whiteboard pattern</a></li>
+            <li><a href="">Temporal dependencies</a></li>
+            </ul>
+         </li> <!-- End of describing components -->
+        <!-- sub-menu : User Guide -->
+        <li class="">
+        <a href="" class="sf-with-ul">User Guide<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+            <ul>
+            <li><a href="">iPOJO and config admin</a></li>
+            <li><a href="">Factories and Instances</a></li>
+            <li><a href="">XML Schemas</a></li>
+            <li><a href="">API</a></li>
+            <li><a href="">Testing components</a></li>
+            <li><a href="">Eclipse Integration</a></li>
+            <li><a href="">FAQ</a></li>
+            <li><a href="">Reference Card</a></li>
+            </ul>
+        </li> <!-- end of user guide -->
+        <!-- sub-menu : Dev Guide -->
+        <li> 
+        <a href="#" class="sf-with-ul">Advanced Topics<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+           <ul>
+            <li><a href="http://felix.apache.org/ipojo/api/1.6.0">Javadoc</a></li>
+            <li><a href="">Handler development</a></li>
+            <li><a href="">Manipulation Metadata </a></li>
+            <li><a href="">Dive into the iPOJO Manipulation depths</a></li>
+           </ul>
+        </li> <!-- End of Dev guide -->
+    </ul> 
+    </li> <!-- End of doc -->
+    <!-- Menu 4 : Tools -->
+    <li class="">
+    <a href="#" class="sf-with-ul">Tools<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+    <ul>
+       <li><a href="">Ant Task</a></li>
+       <li><a href="">Eclipse Plugin</a></li>
+       <li><a href="">Maven Plugin</a></li>
+       <li><a href="">`arch` shell command</a></li>
+       <li><a href="">Online Manipulator</a></li>
+       <li><a href="">Webconsole plugin</a></li>
+       <li><a href="">Junit4OSGi</a></li>
+    </ul>   
+    </li><!-- End of tools -->  
+    <!-- Menu 5 : Support -->
+    <li>
+    <a href="">Support </a>
+    </li>
+    <!-- End of the menu 5 -->          
+    <!-- Menu 6 : Misc -->
+    <li class="">
+    <a href="#" class="sf-with-ul">Misc<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+    <ul>
+       <li><a href="">Supported JVMs</a></li>
+       <li><a href="">Supported OSGi Implementations</a></li>
+       <li><a href="http://ipojo-dark-side.blogspot.com">iPOJO's Dark Side Blog</a></li>
+       <li><a href="">Article & Presentations</a></li>
+       <li><a href="http://www.apache.org/">ASF</a></li>
+       <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+       <li><a href="http://www.apache.org/foundation/thanks.html">Sponsors</a></li>
+    </ul>
+    </li><!-- End of misc -->
+    </ul> <!-- End of the menu -->
+    </div> <!-- Page header -->
+  
+      <!-- 
       
       <div class="tip">
            This page is a translated version of <a href="/site/temporal-service-dependency.html" target="felix_cwiki">/site/temporal-service-dependency.html</a>. In case of
            doubt you might want to refer to the old page.
       </div>
       
+      -->
       
       <h1>Temporal Service Dependency</h1>
-      <p>{include:apache-felix-ipojo-header}</p>
-<div class="content">
-
-# The temporal dependency handler
-
-*Regular service dependencies participate to the instance lifecycle. Moreover, the injected service object is either available or not available. A temporal dependency handler is a little different and provides a different resolution pattern. Indeed, the temporal dependency does not invalidate the instance. Moreover, if not available, the temporal dependency waits (and so blocks the current thread) for a provider. Of course, the maximum waiting time can be specified. If a timeout occurs, the handler throws a Runtime Exception.*
-
-{div:class=toc}
+      
+      <div class="content">
+        <h1 id="the-temporal-dependency-handler">The temporal dependency handler</h1>
+<p><em>Regular service dependencies participate to the instance lifecycle. Moreover, the injected service object is either available or not available. A temporal dependency handler is a little different and provides a different resolution pattern. Indeed, the temporal dependency does not invalidate the instance. Moreover, if not available, the temporal dependency waits (and so blocks the current thread) for a provider. Of course, the maximum waiting time can be specified. If a timeout occurs, the handler throws a Runtime Exception.</em></p>
+<p>{div:class=toc}
 [TOC]
-{div}
-
-## Using the handler
+{div}</p>
+<h2 id="using-the-handler">Using the handler</h2>
+<p>First of all, you need to configure the component type to use the handler such as:</p>
+<div class="codehilite"><pre><span class="nt">&lt;iPOJO</span> <span class="na">xmlns:temporal=</span><span class="s">&quot;org.apache.felix.ipojo.handler.temporal&quot;</span><span class="nt">&gt;</span>
+<span class="nt">&lt;component</span>
+    <span class="na">className=</span><span class="s">&quot;org.apache.felix.ipojo.example.Temporal&quot;</span><span class="nt">&gt;</span>
 
-First of all, you need to configure the component type to use the handler such as:
+    <span class="c">&lt;!-- Temporal dependency configuration --&gt;</span>
+    <span class="nt">&lt;temporal:requires</span> <span class="na">field=</span><span class="s">&quot;mytemporal&quot;</span><span class="nt">/&gt;</span>
 
-    <iPOJO xmlns:temporal="org.apache.felix.ipojo.handler.temporal">
-    <component
-        className="org.apache.felix.ipojo.example.Temporal">
+    <span class="nt">&lt;provides/&gt;</span>
 
-        <!-- Temporal dependency configuration -->
-        <temporal:requires field="mytemporal"/>
+<span class="nt">&lt;/component&gt;</span>
+<span class="nt">&lt;/iPOJO&gt;</span>
+</pre></div>
 
-        <provides/>
 
-    </component>
-    </iPOJO>
-
-Notice that, this handler is an external handler. So, it uses the "org.apache.felix.ipojo.handler.temporal" namespace.
+<p>Notice that, this handler is an external handler. So, it uses the "org.apache.felix.ipojo.handler.temporal" namespace.
 Once described, you can implement your component. The specified field will be mapped to the temporal dependency. As for regular field injection, aggregation, targeted service specification (i.e. interface) is discovered automatically. Filter, comparator and binding policy are also supported. However, the optional attribute is not supported. In fact, this attribute is meaningless in the case of a temporal dependency.
-Using the field in your code will try to find a matching service provider. If a provider is available, the field receives the service object immediately. Else, the thread is stopped and waits for a provider. The default wait time is 3s (you can also specify this time). If no provider is available after this time, the thread throws a RuntimeException. If a provider becomes available during this time, the field receives immediately the value and the execution can continue.
-
-You can also use annotations:
+Using the field in your code will try to find a matching service provider. If a provider is available, the field receives the service object immediately. Else, the thread is stopped and waits for a provider. The default wait time is 3s (you can also specify this time). If no provider is available after this time, the thread throws a RuntimeException. If a provider becomes available during this time, the field receives immediately the value and the execution can continue.</p>
+<p>You can also use annotations:</p>
+<div class="codehilite"><pre><span class="nv">@Component</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">Temporal</span> <span class="p">{</span>
 
-    @Component
-    public class Temporal {
+    <span class="nv">@Temporal</span> <span class="sr">//</span> <span class="n">was</span> <span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">felix</span><span class="o">.</span><span class="n">ipojo</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">temporal</span><span class="o">.</span><span class="n">Requires</span> <span class="n">before</span> <span class="n">the</span> <span class="mf">1.7.0</span>
+    <span class="n">private</span> <span class="n">FooService</span> <span class="n">mytemporal</span><span class="p">;</span>
 
-        @Temporal // was org.apache.felix.ipojo.handler.temporal.Requires before the 1.7.0
-        private FooService mytemporal;
+<span class="p">}</span>
+</pre></div>
 
-    }
 
-## Configuration
+<h2 id="configuration">Configuration</h2>
+<p>The handler has only one mandatory attributes:
+* Field: the implementation field supporting the dependency (not needed with annotations)</p>
+<p>The handler supports on specific optional attributes:
+<em> Timeout: the maximum time waited in order to find a provider (default: 3s). For an infinite timeout, the timeout value is either "infinite" or "-1".
+</em> OnTimeout: specifies the action to do when the timeout occurs. Four actions are supported: null, nullable, empty-array, default-implementation. By default, no action is specified, and an exception occurs when the timeout is reached.</p>
+<p>The attributes from "regular" dependencies are also supported (like filter).
+OnTimeout actions</p>
+<p>When a timeout occurs, you can specify what the handler must do. By default, it throws a runtime exception. However, four others actions can be set in the 'onTimeout' attribute.
+<em> The null action (onTimeout="null") will return "null" instead of the service object.
+</em> The "nullable" action (onTimeout="nullable") will return a "Nullable" object instead of the service object. This object is a fake but can be used a regular service object. However, invoking actions on this object will do nothing. In the case of aggregate dependency, an array containing a "nullable" object is returned.
+<em> The empty action is only supported for aggregate dependency (the field must be an array). In this case, an empty-array is returned. (In the 1.2.0 version, the <code>empty-array</code> attribute became <code>empty</code>)
+</em> The default-implementation action is a little different. Instead of specifying the action, you need to specify the default-implementation (the qualified class name) that you want to use. For example onTimeout="o.a.f.i.MyDefaultLogServiceImpl". In this case, the handler will inject an instance of this object instead of a real service object. On aggregate dependency, an array with one default-implementation object is returned.</p>
+<div class="codehilite"><pre><span class="nt">&lt;iPOJO</span> <span class="na">xmlns:temporal=</span><span class="s">&quot;org.apache.felix.ipojo.handler.temporal&quot;</span><span class="nt">&gt;</span>
+<span class="nt">&lt;component</span>
+    <span class="na">className=</span><span class="s">&quot;org.apache.felix.ipojo.example.Temporal&quot;</span><span class="nt">&gt;</span>
 
-The handler has only one mandatory attributes:
-* Field: the implementation field supporting the dependency (not needed with annotations)
+    <span class="c">&lt;!-- Temporal dependency configuration --&gt;</span>
+    <span class="nt">&lt;temporal:requires</span> <span class="na">field=</span><span class="s">&quot;fs&quot;</span> <span class="na">timeout=</span><span class="s">&quot;300&quot;</span> <span class="na">ontimeout=</span><span class="s">&quot;nullable&quot;</span><span class="nt">/&gt;</span>
 
-The handler supports on specific optional attributes:
-* Timeout: the maximum time waited in order to find a provider (default: 3s). For an infinite timeout, the timeout value is either "infinite" or "-1".
-* OnTimeout: specifies the action to do when the timeout occurs. Four actions are supported: null, nullable, empty-array, default-implementation. By default, no action is specified, and an exception occurs when the timeout is reached.
+    <span class="nt">&lt;provides/&gt;</span>
 
-The attributes from "regular" dependencies are also supported (like filter).
-OnTimeout actions
+<span class="nt">&lt;/component&gt;</span>
+<span class="nt">&lt;/iPOJO&gt;</span>
+</pre></div>
 
-When a timeout occurs, you can specify what the handler must do. By default, it throws a runtime exception. However, four others actions can be set in the 'onTimeout' attribute.
-* The null action (onTimeout="null") will return "null" instead of the service object.
-* The "nullable" action (onTimeout="nullable") will return a "Nullable" object instead of the service object. This object is a fake but can be used a regular service object. However, invoking actions on this object will do nothing. In the case of aggregate dependency, an array containing a "nullable" object is returned.
-* The empty action is only supported for aggregate dependency (the field must be an array). In this case, an empty-array is returned. (In the 1.2.0 version, the `empty-array` attribute became `empty`)
-* The default-implementation action is a little different. Instead of specifying the action, you need to specify the default-implementation (the qualified class name) that you want to use. For example onTimeout="o.a.f.i.MyDefaultLogServiceImpl". In this case, the handler will inject an instance of this object instead of a real service object. On aggregate dependency, an array with one default-implementation object is returned.
 
-    <iPOJO xmlns:temporal="org.apache.felix.ipojo.handler.temporal">
-    <component
-        className="org.apache.felix.ipojo.example.Temporal">
+<p>This is equivalent to:</p>
+<div class="codehilite"><pre><span class="nv">@Component</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">Temporal</span> <span class="p">{</span>
 
-        <!-- Temporal dependency configuration -->
-        <temporal:requires field="fs" timeout="300" ontimeout="nullable"/>
+    <span class="nv">@Temporal</span><span class="p">(</span><span class="n">timeout</span><span class="o">=</span><span class="mi">300</span><span class="p">,</span> <span class="n">ontimeout</span><span class="o">=</span><span class="s">&quot;nullable&quot;</span><span class="p">)</span>
+    <span class="n">private</span> <span class="n">FooService</span> <span class="n">mytemporal</span><span class="p">;</span>
 
-        <provides/>
+<span class="p">}</span>
+</pre></div>
 
-    </component>
-    </iPOJO>
 
-This is equivalent to:
+<h2 id="collection-injection">Collection injection</h2>
+<p>Temporal dependencies can also be injected inside Collection. To achieve this, the 'specification' attribute must indicates the looked specification, and the field must be a Collection.</p>
+<div class="codehilite"><pre><span class="nt">&lt;iPOJO</span> <span class="na">xmlns:temporal=</span><span class="s">&quot;org.apache.felix.ipojo.handler.temporal&quot;</span><span class="nt">&gt;</span>
+<span class="nt">&lt;component</span>
+    <span class="na">className=</span><span class="s">&quot;org.apache.felix.ipojo.example.Temporal&quot;</span><span class="nt">&gt;</span>
 
-    @Component
-    public class Temporal {
+    <span class="c">&lt;!-- Temporal dependency configuration --&gt;</span>
+    <span class="nt">&lt;temporal:requires</span> <span class="na">field=</span><span class="s">&quot;mycollection&quot;</span> <span class="na">specification=</span><span class="s">&quot;my.service.specification&quot;</span><span class="nt">/&gt;</span>
 
-        @Temporal(timeout=300, ontimeout="nullable")
-        private FooService mytemporal;
+    <span class="nt">&lt;provides/&gt;</span>
 
-    }
+<span class="nt">&lt;/component&gt;</span>
+<span class="nt">&lt;/iPOJO&gt;</span>
+</pre></div>
 
-## Collection injection
-Temporal dependencies can also be injected inside Collection. To achieve this, the 'specification' attribute must indicates the looked specification, and the field must be a Collection.
 
-    <iPOJO xmlns:temporal="org.apache.felix.ipojo.handler.temporal">
-    <component
-        className="org.apache.felix.ipojo.example.Temporal">
+<p>This is equivalent to:</p>
+<div class="codehilite"><pre><span class="nv">@Component</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">Temporal</span> <span class="p">{</span>
 
-        <!-- Temporal dependency configuration -->
-        <temporal:requires field="mycollection" specification="my.service.specification"/>
+    <span class="nv">@Temporal</span><span class="p">(</span><span class="n">specification</span><span class="o">=</span><span class="s">&quot;my.service.specification&quot;</span><span class="p">)</span>
+    <span class="n">private</span> <span class="n">List</span><span class="sr">&lt;FooService&gt;</span> <span class="n">mycollection</span><span class="p">;</span>
 
-        <provides/>
+<span class="p">}</span>
+</pre></div>
 
-    </component>
-    </iPOJO>
 
-This is equivalent to:
-
-    @Component
-    public class Temporal {
-
-        @Temporal(specification="my.service.specification")
-        private List<FooService> mycollection;
-
-    }
-
-## Proxy injection
-Temporal dependencies can also be injected as proxies. So it is possible to give the temporal dependency to helper object.
+<h2 id="proxy-injection">Proxy injection</h2>
+<p>Temporal dependencies can also be injected as proxies. So it is possible to give the temporal dependency to helper object.
 On 'scalar' dependencies, the service lookup is executed during an operation invocation. Timeout policies are also executed is the lookup failed.
 On aggregate dependencies (necessary Collection), the service lookup is executed when the iterator(), and toArray(...) methods are invoked. Timeout policies 
-are also executed if the lookup failed. Proxies are enabled by default since the 1.7.0 version.
-
-To set a temporal dependency as a proxy, just add the `proxy` attribute as follows:
-
-    <iPOJO xmlns:temporal="org.apache.felix.ipojo.handler.temporal">
-    <component
-        className="org.apache.felix.ipojo.example.Temporal">
-
-        <!-- Temporal dependencies configuration -->
-        <temporal:requires proxy="true" field="fs"/>
-        <temporal:requires proxy="true" field="mycollection" specification="my.service.specification"/>
-
-        <provides/>
-
-    </component>
-    </iPOJO>
-
-By default, proxies are *enabled*. Setting proxy to `false` disables them.
-
-## Download 
-
-The handler is available on the [download](/documentation/subprojects/apache-felix-ipojo/download.html) page.
-Sources are available on the Felix trunk at the following location: [http://svn.apache.org/repos/asf/felix/trunk/ipojo/handler/temporal](http://svn.apache.org/repos/asf/felix/trunk/ipojo/handler/temporal).
+are also executed if the lookup failed. Proxies are enabled by default since the 1.7.0 version.</p>
+<p>To set a temporal dependency as a proxy, just add the <code>proxy</code> attribute as follows:</p>
+<div class="codehilite"><pre><span class="nt">&lt;iPOJO</span> <span class="na">xmlns:temporal=</span><span class="s">&quot;org.apache.felix.ipojo.handler.temporal&quot;</span><span class="nt">&gt;</span>
+<span class="nt">&lt;component</span>
+    <span class="na">className=</span><span class="s">&quot;org.apache.felix.ipojo.example.Temporal&quot;</span><span class="nt">&gt;</span>
+
+    <span class="c">&lt;!-- Temporal dependencies configuration --&gt;</span>
+    <span class="nt">&lt;temporal:requires</span> <span class="na">proxy=</span><span class="s">&quot;true&quot;</span> <span class="na">field=</span><span class="s">&quot;fs&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;temporal:requires</span> <span class="na">proxy=</span><span class="s">&quot;true&quot;</span> <span class="na">field=</span><span class="s">&quot;mycollection&quot;</span> <span class="na">specification=</span><span class="s">&quot;my.service.specification&quot;</span><span class="nt">/&gt;</span>
+
+    <span class="nt">&lt;provides/&gt;</span>
+
+<span class="nt">&lt;/component&gt;</span>
+<span class="nt">&lt;/iPOJO&gt;</span>
+</pre></div>
+
+
+<p>By default, proxies are <em>enabled</em>. Setting proxy to <code>false</code> disables them.</p>
+<h2 id="download">Download</h2>
+<p>The handler is available on the <a href="/documentation/subprojects/apache-felix-ipojo/download.html">download</a> page.
+Sources are available on the Felix trunk at the following location: <a href="http://svn.apache.org/repos/asf/felix/trunk/ipojo/handler/temporal">http://svn.apache.org/repos/asf/felix/trunk/ipojo/handler/temporal</a>.</p>
+      </div>
+      
+      <img src="http://felix.apache.org/ipojo/site/footer.png" class="footer">
 
-{include:apache-felix-ipojo-footer}
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1422427 by fmeschbe on Sun, 16 Dec 2012 00:36:51 +0000
+        Rev. 1441864 by fmeschbe on Sun, 3 Feb 2013 06:44:40 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project
@@ -218,5 +348,18 @@ Sources are available on the Felix trunk
         may be trademarks or registered trademarks of their respective owners.
       </div>
     </div>
+    </div>
+    
+    <script type="text/javascript">
+    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+    </script>
+    <script type="text/javascript">
+    try{
+    var pageTracker = _gat._getTracker("UA-1518442-4");
+    pageTracker._trackPageview();
+    } catch(err) {}
+    </script>
+
   </body>
 </html>

Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/white-board-pattern-handler.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/white-board-pattern-handler.html (original)
+++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/white-board-pattern-handler.html Sun Feb  3 06:45:21 2013
@@ -20,9 +20,45 @@
   <head>
     <title>Apache Felix - White Board Pattern Handler</title>
     <link rel="icon" href="/res/favicon.ico">
-    <link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
-    <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all">
+    <link rel="stylesheet" href="/site/media.data/site.css" type="text/css" media="all">
+    <link rel="stylesheet" href="/ipojo/site/superfish.css" type="text/css" media="all">
+    <link rel="stylesheet" href="/ipojo/site/style.css" type="text/css" media="all">
     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    
+    <!--
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shCore.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushCSharp.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushPhp.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushJScript.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushVb.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushSql.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushXml.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushShell.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushDelphi.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushPython.js"></script>
+    <script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushJava.js"></script>
+    -->
+    
+    <script type="text/javascript" src="/ipojo/site/jquery-1.js"></script>
+    <script type="text/javascript" src="/ipojo/site/hoverIntent.js"></script>
+    <script type="text/javascript" src="/ipojo/site/superfish.js"></script> 
+    <script type="text/javascript" src="/ipojo/site/supersubs.js"></script> 
+    
+    <script type="text/javascript"> 
+     
+        $(document).ready(function(){ 
+            $("ul.sf-menu").supersubs({ 
+                minWidth:    14,   // minimum width of sub-menus in em units 
+                maxWidth:    30,   // maximum width of sub-menus in em units 
+                extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
+                                   // due to slight rounding differences and font-family 
+            }).superfish();  // call supersubs first, then superfish, so that subs are 
+                             // not display:none when measuring. Call before initialising 
+                             // containing tabs for same reason. 
+        }); 
+     
+    </script>
+    
   </head>
   <body>
     <div class="title">
@@ -37,53 +73,148 @@
         </a>
       </div>
     </div>
+  
+    <div class="main">
+    <div class="main">
+    <div class="page-header">
+    <img src="/ipojo/site/header.png" class="header">
+    <a href="http://ipojo.org"><img src="/ipojo/site/ipojo.png" width="225" class="header-logo"></a>
+    <ul class="sf-menu sf-js-enabled sf-shadow" id="ipojo-menu">
+    <li class="current">
+    <!-- Menu Overview -->
+    <a href="#" class="sf-with-ul">Overview<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+    <ul>
+        <li>
+        <a href="">Home</a>                          
+        </li>
+        <li>
+        <a href="">Why choose iPOJO</a>
+        </li>
+        <li>
+        <a href="">Success stories</a>
+        </li>
+        <li>
+        <a href="">Features</a>
+        </li>
+    </ul>
+    </li>   
     
-    <div class="menu"> 
-      <p><a href="/news.html">news</a>  <br />
-<a href="/license.html">license</a>  <br />
-<a href="/downloads.cgi">downloads</a>  <br />
-<a href="/documentation.html">documentation</a>  <br />
-<a href="/mailinglists.html">mailing lists</a>  <br />
-<a href="/documentation/community/contributing.html">contributing</a>  <br />
-<a href="/sitemap.html">site map</a>  <br />
-<a href="http://www.apache.org/">asf</a>  <br />
-<a href="http://www.apache.org/security/">security</a>  <br />
-<a href="http://www.apache.org/foundation/sponsorship.html">sponsorship</a>  <br />
-<a href="http://www.apache.org/foundation/thanks.html">sponsors</a>  <br />
-</p>
-<iframe
-    src="http://www.apache.org/ads/button.html"
-    style="border-width:0; float: left"
-    frameborder="0"
-    scrolling="no"
-    width="135"
-    height="135">
-</iframe>
-    </div>
+    <li class="">           
+    <!-- Menu download -->
+    <li>
+    <a href="/downloads.cgi">Download </a>
+    </li>
     
-    <div class="main">
-      <div class="breadcrump" style="font-size: 80%;">
-        <a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/documentation.html">Documentation</a>&nbsp;&raquo&nbsp;<a href="/documentation/subprojects.html">Apache Felix Subproject Documentation</a>&nbsp;&raquo&nbsp;<a href="/documentation/subprojects/apache-felix-ipojo.html">Apache Felix iPOJO</a>&nbsp;&raquo&nbsp;<a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide.html">apache-felix-ipojo-userguide</a>&nbsp;&raquo&nbsp;<a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components.html">Describing components</a>
-      </div>
-
+    <li class="">                   
+    <!-- Menu Documentation -->
+    <a href="#" class="sf-with-ul">Documentation<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+    <ul>
+        <!-- sub-menu : getting started -->
+        <li class="">
+        <a href="#" class="sf-with-ul">Getting Started<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+        <ul>
+         <li><a href="">iPOJO in 10 minutes</a></li>
+         <li><a href="">Using Annotations</a></li>
+         <li><a href="">Maven tutorial</a></li>
+         <li><a href="">Advanced tutorial</a></li>
+         <li><a href="">Using Distributed OSGi</a></li>
+         <li><a href="">Application Composition</a></li>
+        </ul>
+        </li> <!-- end of getting started -->
+        <!-- sub menu : Describing Components -->
+         <li class="">
+            <a href="" class="sf-with-ul">Describing components<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+            <ul>
+            <li><a href="">Requiring a service</a></li>
+            <li><a href="">Providing a service</a></li>
+            <li><a href="">Lifecycle management</a></li>
+            <li><a href="">Configuration</a></li>
+            <li><a href="">Introspection</a></li>
+            <li><a href="">Impacting the lifecycle</a></li>
+            <li><a href="">Asynchronous communication</a></li>
+            <li><a href="">JMX management</a></li>
+            <li><a href="">Extender pattern</a></li>
+            <li><a href="">Whiteboard pattern</a></li>
+            <li><a href="">Temporal dependencies</a></li>
+            </ul>
+         </li> <!-- End of describing components -->
+        <!-- sub-menu : User Guide -->
+        <li class="">
+        <a href="" class="sf-with-ul">User Guide<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+            <ul>
+            <li><a href="">iPOJO and config admin</a></li>
+            <li><a href="">Factories and Instances</a></li>
+            <li><a href="">XML Schemas</a></li>
+            <li><a href="">API</a></li>
+            <li><a href="">Testing components</a></li>
+            <li><a href="">Eclipse Integration</a></li>
+            <li><a href="">FAQ</a></li>
+            <li><a href="">Reference Card</a></li>
+            </ul>
+        </li> <!-- end of user guide -->
+        <!-- sub-menu : Dev Guide -->
+        <li> 
+        <a href="#" class="sf-with-ul">Advanced Topics<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+           <ul>
+            <li><a href="http://felix.apache.org/ipojo/api/1.6.0">Javadoc</a></li>
+            <li><a href="">Handler development</a></li>
+            <li><a href="">Manipulation Metadata </a></li>
+            <li><a href="">Dive into the iPOJO Manipulation depths</a></li>
+           </ul>
+        </li> <!-- End of Dev guide -->
+    </ul> 
+    </li> <!-- End of doc -->
+    <!-- Menu 4 : Tools -->
+    <li class="">
+    <a href="#" class="sf-with-ul">Tools<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+    <ul>
+       <li><a href="">Ant Task</a></li>
+       <li><a href="">Eclipse Plugin</a></li>
+       <li><a href="">Maven Plugin</a></li>
+       <li><a href="">`arch` shell command</a></li>
+       <li><a href="">Online Manipulator</a></li>
+       <li><a href="">Webconsole plugin</a></li>
+       <li><a href="">Junit4OSGi</a></li>
+    </ul>   
+    </li><!-- End of tools -->  
+    <!-- Menu 5 : Support -->
+    <li>
+    <a href="">Support </a>
+    </li>
+    <!-- End of the menu 5 -->          
+    <!-- Menu 6 : Misc -->
+    <li class="">
+    <a href="#" class="sf-with-ul">Misc<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+    <ul>
+       <li><a href="">Supported JVMs</a></li>
+       <li><a href="">Supported OSGi Implementations</a></li>
+       <li><a href="http://ipojo-dark-side.blogspot.com">iPOJO's Dark Side Blog</a></li>
+       <li><a href="">Article & Presentations</a></li>
+       <li><a href="http://www.apache.org/">ASF</a></li>
+       <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+       <li><a href="http://www.apache.org/foundation/thanks.html">Sponsors</a></li>
+    </ul>
+    </li><!-- End of misc -->
+    </ul> <!-- End of the menu -->
+    </div> <!-- Page header -->
+  
+      <!-- 
       
       <div class="tip">
            This page is a translated version of <a href="/site/white-board-pattern-handler.html" target="felix_cwiki">/site/white-board-pattern-handler.html</a>. In case of
            doubt you might want to refer to the old page.
       </div>
       
+      -->
       
       <h1>White Board Pattern Handler</h1>
-      <p>{include:apache-felix-ipojo-header}</p>
-<div class="content">
-
-#  The white board pattern handler
-The objective of this handler is to simplify the development of white-board architecture. This architecture-style is based is very close to the extender architecture style but relies on services instead of bundles.
-
-{div:class=toc}
+      
+      <div class="content">
+        <h1 id="the-white-board-pattern-handler">The white board pattern handler</h1>
+<p>The objective of this handler is to simplify the development of white-board architecture. This architecture-style is based is very close to the extender architecture style but relies on services instead of bundles.</p>
+<p>{div:class=toc}
 [TOC]
-{div}
-
+{div}</p>
 <div class="info" markdown="1">
 **Change in the 1.2.0**
 The 1.2.0 uses the namespace `org.apache.felix.ipojo.whiteboard` instead of `org.apache.felix.ipojo.white-board-pattern`
@@ -94,115 +225,114 @@ The 1.2.0 uses the namespace `org.apache
 The 1.7.0 has introduced a new annotations allowing to declare several whiteboard patterns in the same class. The ``@Whiteboards}} annotation is not available in previous version.
 </div>
 
-## The whiteboard pattern
-A whiteboard is based on two different roles:
-* A consumer looking to special services or a services published with a special mark
-* Looked services
-
-More information on this pattern is available in this [document](http://www.osgi.org/wiki/uploads/Links/whiteboard.pdf)
-Implementing a white board pattern could be complex as the extender needs to track these services dynamically. Indeed looked services can be highly dynamic; they can arrive, leave or be modified at runtime. Several services specified in the OSGi specification use white board pattern such as the Device Access Manager.
-
-## Using the handler
-First of all, you need to configure the component type to use the handler such as:
-
-    <ipojo xmlns:wbp="org.apache.felix.ipojo.whiteboard">
-         <component 
-              className="org.apache.felix.ipojo.test.FooWhiteBoardPattern"
-          >
-            <wbp:wbp 
-              filter="(my.property=1)" 
-                  onArrival="onArrival" 
-                  onDeparture="onDeparture" 
-                  onModification="onModification"
-             />
+<h2 id="the-whiteboard-pattern">The whiteboard pattern</h2>
+<p>A whiteboard is based on two different roles:
+<em> A consumer looking to special services or a services published with a special mark
+</em> Looked services</p>
+<p>More information on this pattern is available in this <a href="http://www.osgi.org/wiki/uploads/Links/whiteboard.pdf">document</a>
+Implementing a white board pattern could be complex as the extender needs to track these services dynamically. Indeed looked services can be highly dynamic; they can arrive, leave or be modified at runtime. Several services specified in the OSGi specification use white board pattern such as the Device Access Manager.</p>
+<h2 id="using-the-handler">Using the handler</h2>
+<p>First of all, you need to configure the component type to use the handler such as:</p>
+<div class="codehilite"><pre><span class="nt">&lt;ipojo</span> <span class="na">xmlns:wbp=</span><span class="s">&quot;org.apache.felix.ipojo.whiteboard&quot;</span><span class="nt">&gt;</span>
+     <span class="nt">&lt;component</span> 
+          <span class="na">className=</span><span class="s">&quot;org.apache.felix.ipojo.test.FooWhiteBoardPattern&quot;</span>
+      <span class="nt">&gt;</span>
+        <span class="nt">&lt;wbp:wbp</span> 
+          <span class="na">filter=</span><span class="s">&quot;(my.property=1)&quot;</span> 
+              <span class="na">onArrival=</span><span class="s">&quot;onArrival&quot;</span> 
+              <span class="na">onDeparture=</span><span class="s">&quot;onDeparture&quot;</span> 
+              <span class="na">onModification=</span><span class="s">&quot;onModification&quot;</span>
+         <span class="nt">/&gt;</span>
+
+      <span class="nt">&lt;/component&gt;</span>
+</pre></div>
 
-          </component>
 
-Notice that, this handler is an external handler. So, it uses the "org.apache.felix.ipojo.whiteboard" namespace.
+<p>Notice that, this handler is an external handler. So, it uses the "org.apache.felix.ipojo.whiteboard" namespace.
 Once described, you can implement your component. The methods specified methods will be called when a matching services arrives or leaves or are modified. The modification callback is optional. A matching service is detected by confronting the service reference against the specified filter.
 The filter can target specific service interface (with the objectclass property) or property values.
-In the previous example, these methods could be: 
-
-    public class FooWhiteBoardPattern {
-        List list = new ArrayList();
-        int modifications = 0;    
-        public synchronized void onArrival(ServiceReference ref) {
-            list.add(ref);
-        }    
-        public synchronized void onDeparture(ServiceReference ref) {
-            list.remove(ref);
-        }    
-        public synchronized void onModification(ServiceReference ref) {
-            // ...
-        } 
-
-All methods received the arriving, leaving or modified service reference.
-
-You can also use annotation to declare the same component:
-
-    @Component
-    @Wbp(
-      filter="my.property=1", 
-      onArrival="onArrival" 
-      onDeparture="onDeparture" 
-      onModification="onModification")
-    public class FooWhiteBoardPattern {
-        List list = new ArrayList();
-
-        public synchronized void onArrival(ServiceReference ref) {
-            list.add(ref);
-        }    
-        public synchronized void onDeparture(ServiceReference ref) {
-            list.remove(ref);
-        }    
-        public synchronized void onModification(ServiceReference ref) {
-           //...
-        }
-
-## Configuration
-The handler has only three mandatory attributes:
-* Filter: filter use to discover matching filter.
-* onArrival: declaring the method to invoke when a matching service arrives
-* onDeparture: declaring the method to invoke when a matching service leaves
-
-The onModification attribute is optional. This method is called when an injected service reference is modified but stills valid against the filter.
+In the previous example, these methods could be: </p>
+<div class="codehilite"><pre><span class="n">public</span> <span class="n">class</span> <span class="n">FooWhiteBoardPattern</span> <span class="p">{</span>
+    <span class="n">List</span> <span class="n">list</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ArrayList</span><span class="p">();</span>
+    <span class="nb">int</span> <span class="n">modifications</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>    
+    <span class="n">public</span> <span class="n">synchronized</span> <span class="n">void</span> <span class="n">onArrival</span><span class="p">(</span><span class="n">ServiceReference</span> <span class="nb">ref</span><span class="p">)</span> <span class="p">{</span>
+        <span class="n">list</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="nb">ref</span><span class="p">);</span>
+    <span class="p">}</span>    
+    <span class="n">public</span> <span class="n">synchronized</span> <span class="n">void</span> <span class="n">onDeparture</span><span class="p">(</span><span class="n">ServiceReference</span> <span class="nb">ref</span><span class="p">)</span> <span class="p">{</span>
+        <span class="n">list</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="nb">ref</span><span class="p">);</span>
+    <span class="p">}</span>    
+    <span class="n">public</span> <span class="n">synchronized</span> <span class="n">void</span> <span class="n">onModification</span><span class="p">(</span><span class="n">ServiceReference</span> <span class="nb">ref</span><span class="p">)</span> <span class="p">{</span>
+        <span class="sr">//</span> <span class="o">...</span>
+    <span class="p">}</span>
+</pre></div>
+
+
+<p>All methods received the arriving, leaving or modified service reference.</p>
+<p>You can also use annotation to declare the same component:</p>
+<div class="codehilite"><pre><span class="nv">@Component</span>
+<span class="nv">@Wbp</span><span class="p">(</span>
+  <span class="n">filter</span><span class="o">=</span><span class="s">&quot;my.property=1&quot;</span><span class="p">,</span> 
+  <span class="n">onArrival</span><span class="o">=</span><span class="s">&quot;onArrival&quot;</span> 
+  <span class="n">onDeparture</span><span class="o">=</span><span class="s">&quot;onDeparture&quot;</span> 
+  <span class="n">onModification</span><span class="o">=</span><span class="s">&quot;onModification&quot;</span><span class="p">)</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">FooWhiteBoardPattern</span> <span class="p">{</span>
+    <span class="n">List</span> <span class="n">list</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ArrayList</span><span class="p">();</span>
+
+    <span class="n">public</span> <span class="n">synchronized</span> <span class="n">void</span> <span class="n">onArrival</span><span class="p">(</span><span class="n">ServiceReference</span> <span class="nb">ref</span><span class="p">)</span> <span class="p">{</span>
+        <span class="n">list</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="nb">ref</span><span class="p">);</span>
+    <span class="p">}</span>    
+    <span class="n">public</span> <span class="n">synchronized</span> <span class="n">void</span> <span class="n">onDeparture</span><span class="p">(</span><span class="n">ServiceReference</span> <span class="nb">ref</span><span class="p">)</span> <span class="p">{</span>
+        <span class="n">list</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="nb">ref</span><span class="p">);</span>
+    <span class="p">}</span>    
+    <span class="n">public</span> <span class="n">synchronized</span> <span class="n">void</span> <span class="n">onModification</span><span class="p">(</span><span class="n">ServiceReference</span> <span class="nb">ref</span><span class="p">)</span> <span class="p">{</span>
+       <span class="sr">//</span><span class="o">...</span>
+    <span class="p">}</span>
+</pre></div>
+
+
+<h2 id="configuration">Configuration</h2>
+<p>The handler has only three mandatory attributes:
+<em> Filter: filter use to discover matching filter.
+</em> onArrival: declaring the method to invoke when a matching service arrives
+* onDeparture: declaring the method to invoke when a matching service leaves</p>
+<p>The onModification attribute is optional. This method is called when an injected service reference is modified but stills valid against the filter.
 <div class="note" markdown="1">
-**Notifications**
+<strong>Notifications</strong>
 The implementation will be notified of arrivals, modifications and departures, despite the instance is invalid. Indeed, the implementation must release all objects created from another bundle as soon it leaves.
-</div>
-## Configuring the handler with annotations
-
-It is possible to configure the handler with a simple annotation available in the annotation pack ('annotation' project in the iPOJO trunk). Here is an example of usage:
+</div></p>
+<h2 id="configuring-the-handler-with-annotations">Configuring the handler with annotations</h2>
+<p>It is possible to configure the handler with a simple annotation available in the annotation pack ('annotation' project in the iPOJO trunk). Here is an example of usage:
 {code:java}
 import org.apache.felix.ipojo.annotations.Component;
-import org.osgi.framework.ServiceReference;
-
-@Component
+import org.osgi.framework.ServiceReference;</p>
+<p>@Component
 @org.apache.felix.ipojo.whiteboard.Wbp(filter="(foo=true)", 
         onArrival="onArrival", 
         onDeparture="onDeparture",
         onModification="onModification")
-public class WhiteBoardExemple {
+public class WhiteBoardExemple {</p>
+<div class="codehilite"><pre><span class="n">public</span> <span class="n">void</span> <span class="n">onArrival</span><span class="p">(</span><span class="n">ServiceReference</span> <span class="nb">ref</span><span class="p">)</span> <span class="p">{</span>
+    <span class="sr">//</span> <span class="k">do</span> <span class="n">something</span>
+<span class="p">}</span>
 
-    public void onArrival(ServiceReference ref) {
-        // do something
-    }
+<span class="n">public</span> <span class="n">void</span> <span class="n">onDeparture</span><span class="p">(</span><span class="n">ServiceReference</span> <span class="nb">ref</span><span class="p">)</span> <span class="p">{</span>
+    <span class="sr">//</span> <span class="k">do</span> <span class="n">something</span>
+<span class="p">}</span>
 
-    public void onDeparture(ServiceReference ref) {
-        // do something
-    }
+<span class="n">public</span> <span class="n">void</span> <span class="n">onModification</span><span class="p">(</span><span class="n">ServiceReference</span> <span class="nb">ref</span><span class="p">)</span> <span class="p">{</span>
+    <span class="sr">//</span> <span class="k">do</span> <span class="n">something</span>
+<span class="p">}</span>
+</pre></div>
 
-    public void onModification(ServiceReference ref) {
-        // do something
-    }
 
-}
+<p>}</p>
+<div class="codehilite"><pre><span class="n">The</span>  <span class="n">attribute</span> <span class="n">is</span> <span class="n">optional</span><span class="o">.</span><span class="n">The</span>  <span class="n">attribute</span> <span class="n">allows</span> <span class="n">setting</span> <span class="n">the</span> <span class="n">service</span> <span class="n">filter</span><span class="o">.</span>
 
-    The  attribute is optional.The  attribute allows setting the service filter.
+<span class="n">In</span> <span class="n">the</span> <span class="mf">1.7.0</span><span class="p">,</span> <span class="n">a</span> <span class="k">new</span> <span class="n">annotation</span> <span class="n">was</span> <span class="n">introduced</span> <span class="n">to</span> <span class="n">support</span> <span class="n">the</span> <span class="n">declaration</span> <span class="n">of</span> <span class="n">several</span> <span class="n">whiteboard</span> <span class="n">patterns</span> <span class="n">in</span> <span class="n">the</span> <span class="n">same</span> <span class="n">component:</span>
+</pre></div>
 
-    In the 1.7.0, a new annotation was introduced to support the declaration of several whiteboard patterns in the same component:
 
-@Component
+<p>@Component
 @Whiteboards(whiteboards={
      @Wbp(filter="(foo=true)", 
         onArrival="onArrival", 
@@ -212,19 +342,21 @@ public class WhiteBoardExemple {
         onArrival="onArrival2", 
         onDeparture="onDeparture2")}
 )
-public class WhiteBoardExemple {
+public class WhiteBoardExemple {</p>
+<div class="codehilite"><pre><span class="sr">//</span> <span class="o">...</span>
+</pre></div>
 
-    // ...
 
-}
-
-## Download
-The handler is available on the [download](/documentation/subprojects/apache-felix-ipojo/download.html) page.
-Sources are available on the Felix trunk at the following location: [http://svn.apache.org/repos/asf/felix/trunk/ipojo/handler/whiteboard](http://svn.apache.org/repos/asf/felix/trunk/ipojo/handler/whiteboard).
+<p>}</p>
+<h2 id="download">Download</h2>
+<p>The handler is available on the <a href="/documentation/subprojects/apache-felix-ipojo/download.html">download</a> page.
+Sources are available on the Felix trunk at the following location: <a href="http://svn.apache.org/repos/asf/felix/trunk/ipojo/handler/whiteboard">http://svn.apache.org/repos/asf/felix/trunk/ipojo/handler/whiteboard</a>.</p>
+      </div>
+      
+      <img src="http://felix.apache.org/ipojo/site/footer.png" class="footer">
 
-{include:apache-felix-ipojo-footer}
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1422427 by fmeschbe on Sun, 16 Dec 2012 00:36:51 +0000
+        Rev. 1441864 by fmeschbe on Sun, 3 Feb 2013 06:44:40 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project
@@ -232,5 +364,18 @@ Sources are available on the Felix trunk
         may be trademarks or registered trademarks of their respective owners.
       </div>
     </div>
+    </div>
+    
+    <script type="text/javascript">
+    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+    </script>
+    <script type="text/javascript">
+    try{
+    var pageTracker = _gat._getTracker("UA-1518442-4");
+    pageTracker._trackPageview();
+    } catch(err) {}
+    </script>
+
   </body>
 </html>



Mime
View raw message