You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by bu...@apache.org on 2013/02/03 07:45:22 UTC
svn commit: r849204 [24/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...
Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/how-to-use-ipojo-annotations.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/how-to-use-ipojo-annotations.html (original)
+++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/how-to-use-ipojo-annotations.html Sun Feb 3 06:45:21 2013
@@ -20,9 +20,45 @@
<head>
<title>Apache Felix - How to use iPOJO Annotations</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,196 +73,277 @@
</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> » <a href="/documentation.html">Documentation</a> » <a href="/documentation/subprojects.html">Apache Felix Subproject Documentation</a> » <a href="/documentation/subprojects/apache-felix-ipojo.html">Apache Felix iPOJO</a> » <a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide.html">apache-felix-ipojo-userguide</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/how-to-use-ipojo-annotations.html" target="felix_cwiki">/site/how-to-use-ipojo-annotations.html</a>. In case of
doubt you might want to refer to the old page.
</div>
+ -->
<h1>How to use iPOJO Annotations</h1>
- <p>{include:apache-felix-ipojo-header}</p>
-<div class="content">
-
-# How to use iPOJO annotations
-
-*You can use annotations to define your component types. This page presents supported annotations.*
-
-{div:class=toc}
+
+ <div class="content">
+ <h1 id="how-to-use-ipojo-annotations">How to use iPOJO annotations</h1>
+<p><em>You can use annotations to define your component types. This page presents supported annotations.</em></p>
+<p>{div:class=toc}
[TOC]
-{div}
-
-## Getting iPOJO Annotations:
-
-iPOJO Annotations are defines inside the org.apache.felix.ipojo.annotations project. You can download the Jar file of this project from the [download](/documentation/subprojects/apache-felix-ipojo/download.html) page. Sources are available on the [Felix trunk|http://felix.apache.org/site/sourcecode.html].
-Once added to your class path / build path / dependencies, you can use the annotations as normal annotations. These annotations are automatically processed by the iPOJO manipulator.
-
-### In Eclipse
-
-Add the org.apache.felix.ipojo.annotations jar file in your build path. Do not forget to use a Java compiler accepting annotations (1.5 or higher).
-
-### In Maven
-
-Add the following dependency:
-
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.ipojo.annotations</artifactId>
- <version>1.8.0</version>
- </dependency>
-
-Moreover, you need to set that the source code and the target code are Java 1.5 code. To achieve this, just add the following plugin in your plugins section:
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
-### In Ant
-
-Just add the org.apache.felix.ipojo.annotations jar file in your class path.
-
-## An example of usage
-
-To illustrate annotations usage, let taking the tutorial example. In this tutorial, there are two components:
-* The first one provides the hello service
-* The second one uses the provided hello service
-You can download the archive containing the examples and a preconfigured version of Felix [here](http://people.apache.org/~clement/ipojo/tutorials/annotations/annotation-tutorial.zip).
-
-### Hello Service Provider
-
-The provider uses two annotations. The "component" annotation is mandatory and defines that the class defines a component type. Then the "provides" annotation just declare that the defined component type provides a service.
-
- package ipojo.example.hello.impl;
-
- import ipojo.example.hello.Hello;
-
- import org.apache.felix.ipojo.annotations.Component;
- import org.apache.felix.ipojo.annotations.Provides;
-
- /**
- * Component implementing the Hello service.
- **/
- @Component
- @Provides
- public class HelloImpl implements Hello {
- public String sayHello(String name) {
- return "hello " + name;
- }
- }
-
-### Hello Service Consumer
-
-The Hello Service Consumer use more annotations. First it used the component annotation. To defines its "immediate" behavior, it add the 'immediate' attribute.
-Then, it uses the requires annotation to define a service dependency. Finally, it uses the validate and invalidate annotations to define lifecycle callbacks.
-
- package ipojo.example.hello.client;
-
- import org.apache.felix.ipojo.annotations.Component;
- import org.apache.felix.ipojo.annotations.Invalidate;
- import org.apache.felix.ipojo.annotations.Requires;
- import org.apache.felix.ipojo.annotations.Validate;
-
- import ipojo.example.hello.Hello;
-
- @Component(name="AnnotedHelloClient", immediate=true)
- public class HelloClient implements Runnable {
-
- @Requires
- private Hello[] m_hello; // Service Dependency
-
- private final static int DELAY=10000;
- private boolean end;
-
- public void run() {
- while (!end) {
- try {
- invoke();
- Thread.sleep(DELAY);
- } catch (InterruptedException ie) { }
- /* will recheck end */
- }
- }
-
- public void invoke() {
- for (int i = 0; i < m_hello.length; i++) {
- System.out.println(m_hello[i].
- sayHello("Clement"));
- }
- }
-
- @Validate
- public void starting() {
- Thread T = new Thread(this);
- end = false;
- T.start();
- }
-
- @Invalidate
- public void stopping() {
- end = true;
- }
- }
-
-## Defined Annotations
-
-This section lists defined annotations and how to use them.
-
-### @Component
-
-*Goal:* Defines a component type
-*Target:* The component implementation class
-*Attributes:*
-* name : defines the component type name (optional, default = the class name)
-* immediate: defines the component type as immediate (optional, default = "false")
-* architecture: enable the architecture exposition (optional, default = "false")
-* propagation: enable configuration property propagation (on provided services) (optional, default = "false")
-* managedservice : set the Managed Service PID. (optional, default = no PID (i.e. the managed service will not be exposed)).
-* factoryMethod : set the factory-method. The specified method must be a static method and return a pojo object.(optional, default = iPOJO uses the 'regular' constructor).
-* publicFactory : set if the component type is public. (optional, default = true).
-
-### @Provides
-
-*Goal:* Defines that the component type provide services
-*Target:* The component implementation class
-*Attributes:*
-* specifications: defines the provided interface (optional, default = all implemented interfaces)
-* strategy : the service object creation strategy. Possible values : SINGLETON, SERVICE, METHOD, INSTANCE or the strategy class name. With SINGLETON there is only one POJO per component instance, SERVICE means OSGi Service factory, METHOD delegates the creation to the factory-method of the component, INSTANCE creates one service object per requiring instance. For other strategies, specify the qualified name of the CreationStrategy class. (optional, default = SINGLETON)
-* properties : array containing `@StaticServiceProperties` defining service properties not attached to fields.
-
+{div}</p>
+<h2 id="getting-ipojo-annotations">Getting iPOJO Annotations:</h2>
+<p>iPOJO Annotations are defines inside the org.apache.felix.ipojo.annotations project. You can download the Jar file of this project from the <a href="/documentation/subprojects/apache-felix-ipojo/download.html">download</a> page. Sources are available on the [Felix trunk|http://felix.apache.org/site/sourcecode.html].
+Once added to your class path / build path / dependencies, you can use the annotations as normal annotations. These annotations are automatically processed by the iPOJO manipulator.</p>
+<h3 id="in-eclipse">In Eclipse</h3>
+<p>Add the org.apache.felix.ipojo.annotations jar file in your build path. Do not forget to use a Java compiler accepting annotations (1.5 or higher).</p>
+<h3 id="in-maven">In Maven</h3>
+<p>Add the following dependency:</p>
+<div class="codehilite"><pre><span class="nt"><dependency></span>
+ <span class="nt"><groupId></span>org.apache.felix<span class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>org.apache.felix.ipojo.annotations<span class="nt"></artifactId></span>
+ <span class="nt"><version></span>1.8.0<span class="nt"></version></span>
+<span class="nt"></dependency></span>
+</pre></div>
+
+
+<p>Moreover, you need to set that the source code and the target code are Java 1.5 code. To achieve this, just add the following plugin in your plugins section:</p>
+<div class="codehilite"><pre><span class="nt"><plugin></span>
+ <span class="nt"><groupId></span>org.apache.maven.plugins<span class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>maven-compiler-plugin<span class="nt"></artifactId></span>
+ <span class="nt"><configuration></span>
+ <span class="nt"><source></span>1.5<span class="nt"></source></span>
+ <span class="nt"><target></span>1.5<span class="nt"></target></span>
+ <span class="nt"></configuration></span>
+<span class="nt"></plugin></span>
+</pre></div>
+
+
+<h3 id="in-ant">In Ant</h3>
+<p>Just add the org.apache.felix.ipojo.annotations jar file in your class path.</p>
+<h2 id="an-example-of-usage">An example of usage</h2>
+<p>To illustrate annotations usage, let taking the tutorial example. In this tutorial, there are two components:
+<em> The first one provides the hello service
+</em> The second one uses the provided hello service
+You can download the archive containing the examples and a preconfigured version of Felix <a href="http://people.apache.org/~clement/ipojo/tutorials/annotations/annotation-tutorial.zip">here</a>.</p>
+<h3 id="hello-service-provider">Hello Service Provider</h3>
+<p>The provider uses two annotations. The "component" annotation is mandatory and defines that the class defines a component type. Then the "provides" annotation just declare that the defined component type provides a service.</p>
+<div class="codehilite"><pre><span class="nb">package</span> <span class="n">ipojo</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">hello</span><span class="o">.</span><span class="n">impl</span><span class="p">;</span>
+
+<span class="nb">import</span> <span class="n">ipojo</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">hello</span><span class="o">.</span><span class="n">Hello</span><span class="p">;</span>
+
+<span class="nb">import</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">annotations</span><span class="o">.</span><span class="n">Component</span><span class="p">;</span>
+<span class="nb">import</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">annotations</span><span class="o">.</span><span class="n">Provides</span><span class="p">;</span>
+
+<span class="o">/**</span>
+ <span class="o">*</span> <span class="n">Component</span> <span class="n">implementing</span> <span class="n">the</span> <span class="n">Hello</span> <span class="n">service</span><span class="o">.</span>
+ <span class="o">**/</span>
+<span class="nv">@Component</span>
+<span class="nv">@Provides</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">HelloImpl</span> <span class="n">implements</span> <span class="n">Hello</span> <span class="p">{</span>
+ <span class="n">public</span> <span class="n">String</span> <span class="n">sayHello</span><span class="p">(</span><span class="n">String</span> <span class="n">name</span><span class="p">)</span> <span class="p">{</span>
+ <span class="k">return</span> <span class="s">"hello "</span> <span class="o">+</span> <span class="n">name</span><span class="p">;</span>
+ <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<h3 id="hello-service-consumer">Hello Service Consumer</h3>
+<p>The Hello Service Consumer use more annotations. First it used the component annotation. To defines its "immediate" behavior, it add the 'immediate' attribute.
+Then, it uses the requires annotation to define a service dependency. Finally, it uses the validate and invalidate annotations to define lifecycle callbacks.</p>
+<div class="codehilite"><pre><span class="nb">package</span> <span class="n">ipojo</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">hello</span><span class="o">.</span><span class="n">client</span><span class="p">;</span>
+
+<span class="nb">import</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">annotations</span><span class="o">.</span><span class="n">Component</span><span class="p">;</span>
+<span class="nb">import</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">annotations</span><span class="o">.</span><span class="n">Invalidate</span><span class="p">;</span>
+<span class="nb">import</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">annotations</span><span class="o">.</span><span class="n">Requires</span><span class="p">;</span>
+<span class="nb">import</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">annotations</span><span class="o">.</span><span class="n">Validate</span><span class="p">;</span>
+
+<span class="nb">import</span> <span class="n">ipojo</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">hello</span><span class="o">.</span><span class="n">Hello</span><span class="p">;</span>
+
+<span class="nv">@Component</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">"AnnotedHelloClient"</span><span class="p">,</span> <span class="n">immediate</span><span class="o">=</span><span class="n">true</span><span class="p">)</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">HelloClient</span> <span class="n">implements</span> <span class="n">Runnable</span> <span class="p">{</span>
+
+<span class="nv">@Requires</span>
+<span class="n">private</span> <span class="n">Hello</span><span class="o">[]</span> <span class="n">m_hello</span><span class="p">;</span> <span class="sr">//</span> <span class="n">Service</span> <span class="n">Dependency</span>
+
+<span class="n">private</span> <span class="n">final</span> <span class="n">static</span> <span class="nb">int</span> <span class="n">DELAY</span><span class="o">=</span><span class="mi">10000</span><span class="p">;</span>
+<span class="n">private</span> <span class="n">boolean</span> <span class="n">end</span><span class="p">;</span>
+
+ <span class="n">public</span> <span class="n">void</span> <span class="n">run</span><span class="p">()</span> <span class="p">{</span>
+ <span class="k">while</span> <span class="p">(</span><span class="o">!</span><span class="n">end</span><span class="p">)</span> <span class="p">{</span>
+ <span class="n">try</span> <span class="p">{</span>
+ <span class="n">invoke</span><span class="p">();</span>
+ <span class="n">Thread</span><span class="o">.</span><span class="nb">sleep</span><span class="p">(</span><span class="n">DELAY</span><span class="p">);</span>
+ <span class="p">}</span> <span class="n">catch</span> <span class="p">(</span><span class="n">InterruptedException</span> <span class="n">ie</span><span class="p">)</span> <span class="p">{</span> <span class="p">}</span>
+ <span class="sr">/* will recheck end */</span>
+ <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="n">public</span> <span class="n">void</span> <span class="n">invoke</span><span class="p">()</span> <span class="p">{</span>
+ <span class="k">for</span> <span class="p">(</span><span class="nb">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o"><</span> <span class="n">m_hello</span><span class="o">.</span><span class="nb">length</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
+ <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="n">m_hello</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span>
+ <span class="n">sayHello</span><span class="p">(</span><span class="s">"Clement"</span><span class="p">));</span>
+ <span class="p">}</span>
+<span class="p">}</span>
+
+ <span class="nv">@Validate</span>
+ <span class="n">public</span> <span class="n">void</span> <span class="n">starting</span><span class="p">()</span> <span class="p">{</span>
+ <span class="n">Thread</span> <span class="n">T</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Thread</span><span class="p">(</span><span class="n">this</span><span class="p">);</span>
+ <span class="n">end</span> <span class="o">=</span> <span class="n">false</span><span class="p">;</span>
+ <span class="n">T</span><span class="o">.</span><span class="n">start</span><span class="p">();</span>
+ <span class="p">}</span>
+
+ <span class="nv">@Invalidate</span>
+ <span class="n">public</span> <span class="n">void</span> <span class="n">stopping</span><span class="p">()</span> <span class="p">{</span>
+ <span class="n">end</span> <span class="o">=</span> <span class="n">true</span><span class="p">;</span>
+ <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<h2 id="defined-annotations">Defined Annotations</h2>
+<p>This section lists defined annotations and how to use them.</p>
+<h3 id="component">@Component</h3>
+<p><em>Goal:</em> Defines a component type
+<em>Target:</em> The component implementation class
+<em>Attributes:</em>
+<em> name : defines the component type name (optional, default = the class name)
+</em> immediate: defines the component type as immediate (optional, default = "false")
+<em> architecture: enable the architecture exposition (optional, default = "false")
+</em> propagation: enable configuration property propagation (on provided services) (optional, default = "false")
+<em> managedservice : set the Managed Service PID. (optional, default = no PID (i.e. the managed service will not be exposed)).
+</em> factoryMethod : set the factory-method. The specified method must be a static method and return a pojo object.(optional, default = iPOJO uses the 'regular' constructor).
+* publicFactory : set if the component type is public. (optional, default = true). </p>
+<h3 id="provides">@Provides</h3>
+<p><em>Goal:</em> Defines that the component type provide services
+<em>Target:</em> The component implementation class
+<em>Attributes:</em>
+<em> specifications: defines the provided interface (optional, default = all implemented interfaces)
+</em> strategy : the service object creation strategy. Possible values : SINGLETON, SERVICE, METHOD, INSTANCE or the strategy class name. With SINGLETON there is only one POJO per component instance, SERVICE means OSGi Service factory, METHOD delegates the creation to the factory-method of the component, INSTANCE creates one service object per requiring instance. For other strategies, specify the qualified name of the CreationStrategy class. (optional, default = SINGLETON)
+* properties : array containing <code>@StaticServiceProperties</code> defining service properties not attached to fields.</p>
<div class="box">
<div class="box-blue-header">
<div class="box-blue-title">
@@ -251,31 +368,27 @@ The <tt>factory</tt> attribute became <t
<div class="box-blue-footer"></div>
</div>
-### @Requires
-
-*Goal:* Defines a service dependency
-*Target:* Field
-*Attributes:*
-* Filter: defines the LDAP filter (optional)
-* Optional: defines if the dependency is optional (optional, default = "false")
-* Id: defines the dependency Id (useful to identify bind & unbind methods) (optional, default = field name) (if a dependency with the same id is already created (by a @bind or @unbind annotation), it merges the dependencies).
-* Nullable: enable or disable the Null Object injection when the dependency is optional and no providers are available (optional, default = "true")
-* Defaultimplementation: set the Default-Implmentation (optional, by default iPOJO uses a Null object)
-* Policy: defines the binding policy (accepted value : dynamic, static, dynamic-priority) (optional, default = "dynamic")
-* Comparator: defines the comparator to use to sort service references (optional, default = OSGi Service Reference Comparator)
-* From : defines the specific provider to use
-* Specification : the required service specification. This attribute is required for Collection field. (optional, default = annotated field type).
-* Proxy : enables / disables the proxy injection (enabled by default)
-
-### @ServiceProperty
-
-*Goal:* Defines a service property
-*Target:* Field
-*Attributes:*
-* name: property name (optional, default=field name
-* value: property value (optional, default=no value)
-* mandatory : is the property mandatory? (optional, default=false)
-
+<h3 id="requires">@Requires</h3>
+<p><em>Goal:</em> Defines a service dependency
+<em>Target:</em> Field
+<em>Attributes:</em>
+<em> Filter: defines the LDAP filter (optional)
+</em> Optional: defines if the dependency is optional (optional, default = "false")
+<em> Id: defines the dependency Id (useful to identify bind & unbind methods) (optional, default = field name) (if a dependency with the same id is already created (by a @bind or @unbind annotation), it merges the dependencies).
+</em> Nullable: enable or disable the Null Object injection when the dependency is optional and no providers are available (optional, default = "true")
+<em> Defaultimplementation: set the Default-Implmentation (optional, by default iPOJO uses a Null object)
+</em> Policy: defines the binding policy (accepted value : dynamic, static, dynamic-priority) (optional, default = "dynamic")
+<em> Comparator: defines the comparator to use to sort service references (optional, default = OSGi Service Reference Comparator)
+</em> From : defines the specific provider to use
+<em> Specification : the required service specification. This attribute is required for Collection field. (optional, default = annotated field type).
+</em> Proxy : enables / disables the proxy injection (enabled by default)</p>
+<h3 id="serviceproperty">@ServiceProperty</h3>
+<p><em>Goal:</em> Defines a service property
+<em>Target:</em> Field
+<em>Attributes:</em>
+<em> name: property name (optional, default=field name
+</em> value: property value (optional, default=no value)
+* mandatory : is the property mandatory? (optional, default=false)</p>
<div class="box">
<div class="box-blue-header">
<div class="box-blue-title">
@@ -288,23 +401,19 @@ A mandatory property must receive a valu
<div class="box-blue-footer"></div>
</div>
-### @ServiceController
-
-*Goal:* Control the service exposition
-*Target:* Field (Boolean)
-*Attributes:*
-* value : the default value. If set to false, it disables the initial exposition
-* specification : set the target of the controller, must be an exposed service interface. By default, the controller targets all services.
-
-### @Property
-
-*Goal:* Defines a property
-*Target:* Field or Method
-*Attributes:*
-* name: property name (optional, default=field name computed by removing "set" from the method name (for instance setFoo(String ff) will get the Foo name))
-* value: property value (optional, default=no value)
-* mandatory : is the property mandatory? (optional, default=false)
-
+<h3 id="servicecontroller">@ServiceController</h3>
+<p><em>Goal:</em> Control the service exposition
+<em>Target:</em> Field (Boolean)
+<em>Attributes:</em>
+<em> value : the default value. If set to false, it disables the initial exposition
+</em> specification : set the target of the controller, must be an exposed service interface. By default, the controller targets all services.</p>
+<h3 id="property">@Property</h3>
+<p><em>Goal:</em> Defines a property
+<em>Target:</em> Field or Method
+<em>Attributes:</em>
+<em> name: property name (optional, default=field name computed by removing "set" from the method name (for instance setFoo(String ff) will get the Foo name))
+</em> value: property value (optional, default=no value)
+* mandatory : is the property mandatory? (optional, default=false)</p>
<div class="box">
<div class="box-blue-header">
<div class="box-blue-title">
@@ -317,133 +426,106 @@ If another property with the same name i
<div class="box-blue-footer"></div>
</div>
-### @Updated
-*Goal:* Defines method called when a reconfiguration is completed.
-*Target:* a method (receiving a dictionary in argument)
-
-### @Bind
-
-*Goal:* Defines a bind method
-*Target:* Method
-*Attributes:*
-* Id: Dependency Id, if the id is already defines in a "@requires " or "@unbind" annotation, it adds this method as a bind method of the already created dependency. (optional, default= no id, compute an id if the method name begin by "bind" (for instance "bindFoo" will have the "Foo" id))
-* Specification : required dependency (optional)
-* Aggregate : is the dependency an aggregate dependency (optional, default= "false")
-* Optional: is the dependency an optional dependency (optional, default= "false")
-* Filter: dependency LDAP filter (optional)
-* Policy: defines the binding policy (accepted value : dynamic, static, dynamic-priority) (optional, default = "dynamic")
-* Comparator: defines the comparator to use to sort service references (optional, default = OSGi Service Reference Comparator)
-* From : defines the specific provider to use
-
-### @Unbind
-
-*Goal:* Defines an unbind method
-*Target:* Method
-*Attributes:*
-* Id: Dependency Id, if the id is already defines in a "@requires" or "@bind" annotation, it adds this method as an unbind method of the already created dependency. (optional, default= no id, compute an id if the method name begin by "unbind" (for instance "unbindFoo" will have the "Foo" id))
-* Specification : required dependency (optional)
-* Aggregate : is the dependency an aggregate dependency (optional, default= "false")
-* Optional: is the dependency an optional dependency (optional, default= "false")
-* Filter: dependency LDAP filter (optional)
-* Policy: defines the binding policy (accepted value : dynamic, static, dynamic-priority) (optional, default = "dynamic")
-* Comparator: defines the comparator to use to sort service references (optional, default = OSGi Service Reference Comparator)
-* From : defines the specific provider to use
-
-### @Modified
-
-*Goal:* Defines an `modified` method, called when a bound service is udpated.
-*Target:* Method
-*Attributes:*
-* Id: Dependency Id, if the id is already defines in a "@requires" or "@bind" annotation, it adds this method as an unbind method of the already created dependency. (optional, default= no id, compute an id if the method name begin by "unbind" (for instance "unbindFoo" will have the "Foo" id))
-* Specification : required dependency (optional)
-* Aggregate : is the dependency an aggregate dependency (optional, default= "false")
-* Optional: is the dependency an optional dependency (optional, default= "false")
-* Filter: dependency LDAP filter (optional)
-* Policy: defines the binding policy (accepted value : dynamic, static, dynamic-priority) (optional, default = "dynamic")
-* Comparator: defines the comparator to use to sort service references (optional, default = OSGi Service Reference Comparator)
-* From : defines the specific provider to use
-
-### @Validate
-
-*Goal:* defines a validate lifecycle callback
-*Target:* method
-
-### @Invalidate
-
-*Goal:* defines a validate lifecycle callback
-*Target:* method
-
-### @PostRegistration
-
-*Goal:* defines a callback invoked after service registration. The callback must have the following signature : `public void name(ServiceReference ref)`
-*Target:* method
-
-### @PostUnregistration
-
-*Goal:* defines a callback invoked after service unregistration. The callback must have the following signature : `public void name(ServiceReference ref)`
-*Target:* method
-
-### @Instantiate
-
-*Goal:* declare a simple instance (this is equivalent to `<instance component="..."></instance>`
-*Target:* class
-*Attribute:*
-* name: the instance name (optional)
-
-### Temporal Dependencies (external handler)
-
-The temporal dependency handler is an external handler. However, it can be used with an annotation defined in the iPOJO annotations jar file.
+<h3 id="updated">@Updated</h3>
+<p><em>Goal:</em> Defines method called when a reconfiguration is completed.
+<em>Target:</em> a method (receiving a dictionary in argument)</p>
+<h3 id="bind">@Bind</h3>
+<p><em>Goal:</em> Defines a bind method
+<em>Target:</em> Method
+<em>Attributes:</em>
+<em> Id: Dependency Id, if the id is already defines in a "@requires " or "@unbind" annotation, it adds this method as a bind method of the already created dependency. (optional, default= no id, compute an id if the method name begin by "bind" (for instance "bindFoo" will have the "Foo" id))
+</em> Specification : required dependency (optional)
+<em> Aggregate : is the dependency an aggregate dependency (optional, default= "false")
+</em> Optional: is the dependency an optional dependency (optional, default= "false")
+<em> Filter: dependency LDAP filter (optional)
+</em> Policy: defines the binding policy (accepted value : dynamic, static, dynamic-priority) (optional, default = "dynamic")
+<em> Comparator: defines the comparator to use to sort service references (optional, default = OSGi Service Reference Comparator)
+</em> From : defines the specific provider to use</p>
+<h3 id="unbind">@Unbind</h3>
+<p><em>Goal:</em> Defines an unbind method
+<em>Target:</em> Method
+<em>Attributes:</em>
+<em> Id: Dependency Id, if the id is already defines in a "@requires" or "@bind" annotation, it adds this method as an unbind method of the already created dependency. (optional, default= no id, compute an id if the method name begin by "unbind" (for instance "unbindFoo" will have the "Foo" id))
+</em> Specification : required dependency (optional)
+<em> Aggregate : is the dependency an aggregate dependency (optional, default= "false")
+</em> Optional: is the dependency an optional dependency (optional, default= "false")
+<em> Filter: dependency LDAP filter (optional)
+</em> Policy: defines the binding policy (accepted value : dynamic, static, dynamic-priority) (optional, default = "dynamic")
+<em> Comparator: defines the comparator to use to sort service references (optional, default = OSGi Service Reference Comparator)
+</em> From : defines the specific provider to use</p>
+<h3 id="modified">@Modified</h3>
+<p><em>Goal:</em> Defines an <code>modified</code> method, called when a bound service is udpated.
+<em>Target:</em> Method
+<em>Attributes:</em>
+<em> Id: Dependency Id, if the id is already defines in a "@requires" or "@bind" annotation, it adds this method as an unbind method of the already created dependency. (optional, default= no id, compute an id if the method name begin by "unbind" (for instance "unbindFoo" will have the "Foo" id))
+</em> Specification : required dependency (optional)
+<em> Aggregate : is the dependency an aggregate dependency (optional, default= "false")
+</em> Optional: is the dependency an optional dependency (optional, default= "false")
+<em> Filter: dependency LDAP filter (optional)
+</em> Policy: defines the binding policy (accepted value : dynamic, static, dynamic-priority) (optional, default = "dynamic")
+<em> Comparator: defines the comparator to use to sort service references (optional, default = OSGi Service Reference Comparator)
+</em> From : defines the specific provider to use</p>
+<h3 id="validate">@Validate</h3>
+<p><em>Goal:</em> defines a validate lifecycle callback
+<em>Target:</em> method</p>
+<h3 id="invalidate">@Invalidate</h3>
+<p><em>Goal:</em> defines a validate lifecycle callback
+<em>Target:</em> method</p>
+<h3 id="postregistration">@PostRegistration</h3>
+<p><em>Goal:</em> defines a callback invoked after service registration. The callback must have the following signature : <code>public void name(ServiceReference ref)</code>
+<em>Target:</em> method</p>
+<h3 id="postunregistration">@PostUnregistration</h3>
+<p><em>Goal:</em> defines a callback invoked after service unregistration. The callback must have the following signature : <code>public void name(ServiceReference ref)</code>
+<em>Target:</em> method</p>
+<h3 id="instantiate">@Instantiate</h3>
+<p><em>Goal:</em> declare a simple instance (this is equivalent to <code><instance component="..."></instance></code>
+<em>Target:</em> class
+<em>Attribute:</em>
+* name: the instance name (optional)</p>
+<h3 id="temporal-dependencies-external-handler">Temporal Dependencies (external handler)</h3>
+<p>The temporal dependency handler is an external handler. However, it can be used with an annotation defined in the iPOJO annotations jar file.
The annotation is org.apache.felix.ipojo.handler.temporal.Requires and targets a field.
-*Attributes:*
+<em>Attributes:</em>
* filter : specify the dependency filter
* timeout : specify the dependency timeout (optional)
* onTimeout : specify the onTimeout action (null, nullable, empty-array, default-implementation (specify the class name in this case) (optional).
* specification : the required service specification. This attribute is required for Collection field. (optional, default = annotated field type).
- * proxy : Inject a proxy instead of the real object. This allows passing this reference to collaborators. (Default = false)
-
-### Exposing instances as a JMX MBean (external handler)
-
-The JMX Handler allows exposing an instance as a JMX MBean. To configure the JMX handler directly from your code, three annotations are provided. They are in the `org.apache.felix.ipojo.handlers.jmx` package
-
-The `@org.apache.felix.ipojo.handlers.jmx.Config` (`@Config` if the package it correctly imported) annotation is a type annotation (so placed on the `class` element. This annotation indicates that the instance will be exposed as an MBean. This annotation supports:
-* usesMOSGi: set to `true` to use MOSGi. Otherwise, the MBean will be exposed in the MBean Platform Server (default: `false`).
-* objectname: set the MBean objectname. The objectname must follow JMX specification. (default: `package-name:factory-name:instance-name`)
-* domain: set the MBean domain. (default: `package-name`)
-* name: set the MBean name. (default: `instance-name`).
-
-The `@org.apache.felix.ipojo.handlers.jmx.Property` (`@Property`) annotation is a field annotation indicating that the field is exposed in the MBean. The supported attributes are:
-* name: set the property name
-* rights: set the access permission. Possible values are `r` (read only) and `w` (read and write). By default, properties are in read-only mode.
-* notification: enables notification on this property. By default notifications are disabled.
-
-The `@org.apache.felix.ipojo.handlers.jmx.Method` (`@Method`) annotation is a method annotation indicating that the method is exposed in the MBean. Only one attribute can be customized:
-* description: set the method description.
-
-## Advanced topics and FAQ
-
-### Metadata file and annotation merge
-
-It is possible to defines component type both in the metadata file (in XML) and by using annotation. However, if a component type defined by using annotations has the same name than a type define in the XML file, the XML descriptor override the annotation defined type. However, a warning message is launched during the manipulation.
+ * proxy : Inject a proxy instead of the real object. This allows passing this reference to collaborators. (Default = false) </p>
+<h3 id="exposing-instances-as-a-jmx-mbean-external-handler">Exposing instances as a JMX MBean (external handler)</h3>
+<p>The JMX Handler allows exposing an instance as a JMX MBean. To configure the JMX handler directly from your code, three annotations are provided. They are in the <code>org.apache.felix.ipojo.handlers.jmx</code> package</p>
+<p>The <code>@org.apache.felix.ipojo.handlers.jmx.Config</code> (<code>@Config</code> if the package it correctly imported) annotation is a type annotation (so placed on the <code>class</code> element. This annotation indicates that the instance will be exposed as an MBean. This annotation supports:
+<em> usesMOSGi: set to <code>true</code> to use MOSGi. Otherwise, the MBean will be exposed in the MBean Platform Server (default: <code>false</code>).
+</em> objectname: set the MBean objectname. The objectname must follow JMX specification. (default: <code>package-name:factory-name:instance-name</code>)
+<em> domain: set the MBean domain. (default: <code>package-name</code>)
+</em> name: set the MBean name. (default: <code>instance-name</code>).</p>
+<p>The <code>@org.apache.felix.ipojo.handlers.jmx.Property</code> (<code>@Property</code>) annotation is a field annotation indicating that the field is exposed in the MBean. The supported attributes are:
+<em> name: set the property name
+</em> rights: set the access permission. Possible values are <code>r</code> (read only) and <code>w</code> (read and write). By default, properties are in read-only mode.
+* notification: enables notification on this property. By default notifications are disabled.</p>
+<p>The <code>@org.apache.felix.ipojo.handlers.jmx.Method</code> (<code>@Method</code>) annotation is a method annotation indicating that the method is exposed in the MBean. Only one attribute can be customized:
+* description: set the method description.</p>
+<h2 id="advanced-topics-and-faq">Advanced topics and FAQ</h2>
+<h3 id="metadata-file-and-annotation-merge">Metadata file and annotation merge</h3>
+<p>It is possible to defines component type both in the metadata file (in XML) and by using annotation. However, if a component type defined by using annotations has the same name than a type define in the XML file, the XML descriptor override the annotation defined type. However, a warning message is launched during the manipulation.</p>
+<h3 id="instance-creation">Instance creation</h3>
+<p>The @Instantiate annotation allows creating an instance, but this declaration is limited:
+<em> it does not support configuration
+</em> it does not allow naming
+* the instance is created in the global scope (so no composition)</p>
+<p>To define instances, you should use the XML descriptor. Instance can refer to annotated types by referring to their names.</p>
+<div class="codehilite"><pre><span class="o"><</span><span class="n">instance</span> <span class="n">component</span><span class="o">=</span><span class="s">"ipojo.example.hello.impl.HelloImpl"</span><span class="o">/></span>
+<span class="o"><</span><span class="n">instance</span> <span class="n">component</span><span class="o">=</span><span class="s">"AnnotedHelloClient"</span><span class="o">/></span>
+</pre></div>
-### Instance creation
-The @Instantiate annotation allows creating an instance, but this declaration is limited:
-* it does not support configuration
-* it does not allow naming
-* the instance is created in the global scope (so no composition)
-
-To define instances, you should use the XML descriptor. Instance can refer to annotated types by referring to their names.
-
- <instance component="ipojo.example.hello.impl.HelloImpl"/>
- <instance component="AnnotedHelloClient"/>
-
-### Using Custom Annotations
-
-External handlers can provides their own annotations. Using these annotations just requires to add them to your build path. To external handlers annotations, please refer to the external handler documentation.
+<h3 id="using-custom-annotations">Using Custom Annotations</h3>
+<p>External handlers can provides their own annotations. Using these annotations just requires to add them to your build path. To external handlers annotations, please refer to the external handler documentation.</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
@@ -451,5 +533,18 @@ External handlers can provides their own
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/ipojo-advanced-topics.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics.html (original)
+++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics.html Sun Feb 3 06:45:21 2013
@@ -20,9 +20,45 @@
<head>
<title>Apache Felix - iPOJO Advanced Topics</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,58 +73,157 @@
</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> » <a href="/documentation.html">Documentation</a> » <a href="/documentation/subprojects.html">Apache Felix Subproject Documentation</a> » <a href="/documentation/subprojects/apache-felix-ipojo.html">Apache Felix iPOJO</a> » <a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide.html">apache-felix-ipojo-userguide</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/ipojo-advanced-topics.html" target="felix_cwiki">/site/ipojo-advanced-topics.html</a>. In case of
doubt you might want to refer to the old page.
</div>
+ -->
<h1>iPOJO Advanced Topics</h1>
- <p>{include:apache-felix-ipojo-header}</p>
-<div class="content">
-
-# Advanced Topics
-
-*This page presents some advanced features.*
-
-* [Combining iPOJO and Configuration Admin](/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/combining-ipojo-and-configuration-admin.html)
-* [Constructing POJO objects with factory methods](/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/constructing-pojo-objects-with-factory-methods.html)
-* [How-to use iPOJO factories](/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/how-to-use-ipojo-factories.html)
-* [iPOJO Hierarchical Composition Overview](/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/ipojo-hierarchical-composition-overview.html)
+
+ <div class="content">
+ <h1 id="advanced-topics">Advanced Topics</h1>
+<p><em>This page presents some advanced features.</em></p>
+<ul>
+<li><a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/combining-ipojo-and-configuration-admin.html">Combining iPOJO and Configuration Admin</a></li>
+<li><a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/constructing-pojo-objects-with-factory-methods.html">Constructing POJO objects with factory methods</a></li>
+<li><a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/how-to-use-ipojo-factories.html">How-to use iPOJO factories</a></li>
+<li><a href="/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/ipojo-hierarchical-composition-overview.html">iPOJO Hierarchical Composition Overview</a></li>
+</ul>
+ </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
@@ -96,5 +231,18 @@
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>