felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r859869 - in /websites/staging/felix/trunk/content: ./ documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-devguide/how-to-write-your-own-handler.html
Date Thu, 25 Apr 2013 14:43:59 GMT
Author: buildbot
Date: Thu Apr 25 14:43:59 2013
New Revision: 859869

Log:
Staging update by buildbot for felix

Modified:
    websites/staging/felix/trunk/content/   (props changed)
    websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-devguide/how-to-write-your-own-handler.html

Propchange: websites/staging/felix/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Apr 25 14:43:59 2013
@@ -1 +1 @@
-1475721
+1475802

Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-devguide/how-to-write-your-own-handler.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-devguide/how-to-write-your-own-handler.html
(original)
+++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-devguide/how-to-write-your-own-handler.html
Thu Apr 25 14:43:59 2013
@@ -558,31 +558,31 @@ The handler needs to be notified when co
 <p>This handler needs to be packaged inside an iPOJO bundle. The bundle will import
the <code>org.apache.felix.ipojo</code>, <code>org.osgi.framework</code>
and <code>org.osgi.service.log</code> packages.</p>
 <h3 id="handler-usage">Handler usage</h3>
 <p>To use this handler, a component use the <code>Log</code> annotation,
with a level attribute. This level attribute's value can be <code>"error"</code>,
<code>"warning"</code> or <code>"info"</code>. Here is an usage example:</p>
-<div class="codehilite"><pre>package org.apache.felix.ipojo.log.handler.example;
+<div class="codehilite"><pre><span class="kn">package</span> <span
class="n">org</span><span class="o">.</span><span class="na">apache</span><span
class="o">.</span><span class="na">felix</span><span class="o">.</span><span
class="na">ipojo</span><span class="o">.</span><span class="na">log</span><span
class="o">.</span><span class="na">handler</span><span class="o">.</span><span
class="na">example</span><span class="o">;</span>
 
-import org.apache.felix.ipojo.annotations.*;
-import org.apache.felix.ipojo.foo.FooService;
-import org.apache.felix.ipojo.log.handler.Log;
-
-@Component(immediate = true)
-@Log(level = Log.Level.INFO) // We configure the handler.
-@Instantiate(name = &quot;my.simple.consumer&quot;)
-public class SimpleComponent {
-
-    @Requires
-    FooService fs;
-
-    @Validate
-    public void starting() {
-        System.out.println(&quot;Starting...&quot;);
-        fs.foo();
-    }
-
-    @Invalidate
-    public void stopping() {
-        System.out.println(&quot;Stopping...&quot;);
-    }
-}
+<span class="kn">import</span> <span class="nn">org.apache.felix.ipojo.annotations.*</span><span
class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.felix.ipojo.foo.FooService</span><span
class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.felix.ipojo.log.handler.Log</span><span
class="o">;</span>
+
+<span class="nd">@Component</span><span class="o">(</span><span
class="n">immediate</span> <span class="o">=</span> <span class="kc">true</span><span
class="o">)</span>
+<span class="nd">@Log</span><span class="o">(</span><span class="n">level</span>
<span class="o">=</span> <span class="n">Log</span><span class="o">.</span><span
class="na">Level</span><span class="o">.</span><span class="na">INFO</span><span
class="o">)</span> <span class="c1">// We configure the handler.</span>
+<span class="nd">@Instantiate</span><span class="o">(</span><span
class="n">name</span> <span class="o">=</span> <span class="s">&quot;my.simple.consumer&quot;</span><span
class="o">)</span>
+<span class="kd">public</span> <span class="kd">class</span> <span
class="nc">SimpleComponent</span> <span class="o">{</span>
+
+    <span class="nd">@Requires</span>
+    <span class="n">FooService</span> <span class="n">fs</span><span
class="o">;</span>
+
+    <span class="nd">@Validate</span>
+    <span class="kd">public</span> <span class="kt">void</span> <span
class="nf">starting</span><span class="o">()</span> <span class="o">{</span>
+        <span class="n">System</span><span class="o">.</span><span
class="na">out</span><span class="o">.</span><span class="na">println</span><span
class="o">(</span><span class="s">&quot;Starting...&quot;</span><span
class="o">);</span>
+        <span class="n">fs</span><span class="o">.</span><span
class="na">foo</span><span class="o">();</span>
+    <span class="o">}</span>
+
+    <span class="nd">@Invalidate</span>
+    <span class="kd">public</span> <span class="kt">void</span> <span
class="nf">stopping</span><span class="o">()</span> <span class="o">{</span>
+        <span class="n">System</span><span class="o">.</span><span
class="na">out</span><span class="o">.</span><span class="na">println</span><span
class="o">(</span><span class="s">&quot;Stopping...&quot;</span><span
class="o">);</span>
+    <span class="o">}</span>
+<span class="o">}</span>
 </pre></div>
 
 
@@ -997,7 +997,7 @@ Then, 'scalar' annotation attributes are
                 may be trademarks or registered trademarks of their respective owners.
                 </div>
                 <div class="timestamp span3 offset2">
-                Rev. 1475721 by clement on Thu, 25 Apr 2013 12:22:18 +0000
+                Rev. 1475802 by clement on Thu, 25 Apr 2013 14:43:50 +0000
                 </div>
             </div>
         </footer>           



Mime
View raw message