blob: 95e97c4e589caf1112382bc345a9efd530a1521e [file] [log] [blame]
Clement Escoffier50254022008-05-16 20:33:54 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Clement Escoffier3e0db1e2009-01-15 15:35:17 +00002<html><head>
3
4
Clement Escoffier50254022008-05-16 20:33:54 +00005
Clement Escoffier3e0db1e2009-01-15 15:35:17 +00006 <title>Apache Felix - Architecture Handler</title>
7 <link rel="stylesheet" href="architecture-handler_files/site.css" type="text/css" media="all">
8 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
9 </head><body>
10 <div class="title"><div class="logo"><a href="http://felix.apache.org/site/index.html"><img alt="Apache Felix" src="architecture-handler_files/logo.png" border="0"></a></div><div class="header"><a href="http://www.apache.org/"><img alt="Apache" src="architecture-handler_files/apache.png" border="0"></a></div></div>
11 <div class="menu">
12<ul>
13 <li><a href="http://felix.apache.org/site/news.html" title="news">news</a></li>
14 <li><a href="http://felix.apache.org/site/license.html" title="license">license</a></li>
15 <li><span class="nobr"><a href="http://felix.apache.org/site/downloads.cgi" title="Visit page outside Confluence" rel="nofollow">downloads<sup><img class="rendericon" src="architecture-handler_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span></li>
16 <li><a href="http://felix.apache.org/site/documentation.html" title="documentation">documentation</a></li>
17 <li><a href="http://felix.apache.org/site/mailinglists.html" title="mailinglists">mailing lists</a></li>
18 <li><a href="http://felix.apache.org/site/contributing.html" title="Contributing">contributing</a></li>
19 <li><span class="nobr"><a href="http://www.apache.org/" title="Visit page outside Confluence" rel="nofollow">asf<sup><img class="rendericon" src="architecture-handler_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span></li>
20 <li><span class="nobr"><a href="http://www.apache.org/foundation/sponsorship.html" title="Visit page outside Confluence" rel="nofollow">sponsorship<sup><img class="rendericon" src="architecture-handler_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span></li>
21 <li><span class="nobr"><a href="http://www.apache.org/foundation/thanks.html" title="Visit page outside Confluence" rel="nofollow">sponsors<sup><img class="rendericon" src="architecture-handler_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span>
Clement Escoffier50254022008-05-16 20:33:54 +000022<!-- ApacheCon Ad -->
Clement Escoffier3e0db1e2009-01-15 15:35:17 +000023<iframe src="architecture-handler_files/button.html" style="border-width: 0pt; float: left;" scrolling="no" width="135" frameborder="0" height="135"></iframe>
24<p style="height: 100px;">
25<!-- ApacheCon Ad -->
26</p></li></ul> </div>
27 <div class="main">
28<table class="sectionMacro" border="0" cellpadding="5" cellspacing="0" width="100%"><tbody><tr>
29<td class="confluenceTd" valign="top" width="80%">
30<h1><a name="ArchitectureHandler-IntrospectionandArchitecture"></a>Introspection and Architecture</h1>
Clement Escoffier50254022008-05-16 20:33:54 +000031
Clement Escoffier3e0db1e2009-01-15 15:35:17 +000032<p>The architecture feature allows obtaining an architectural /
33component view of your systems. It exposes a snapshot of the present
34instances &amp; factories, the state of these instances ...<br>
35Moreover; iPOJO defines an 'arch' command displaying this architecture
36in Felix. You need to install the arch command bundle available in the
37Felix trunk.</p>
Clement Escoffier50254022008-05-16 20:33:54 +000038
Clement Escoffier3e0db1e2009-01-15 15:35:17 +000039<h2><a name="ArchitectureHandler-Reflectiononthecomponent"></a>Reflection on the component</h2>
Clement Escoffier50254022008-05-16 20:33:54 +000040
Clement Escoffier3e0db1e2009-01-15 15:35:17 +000041<p>The architecture feature does "reflection" on the iPOJO containers.
42It gathers information about the component (state, class name ...),
43requirement (state, multiple, optional ...), provided services (state,
44properties) ... Each handler can participate to the architecture. This
45information allows you to know why an instance does not start, or why
46the component does not publish / provide a service.</p>
Clement Escoffier50254022008-05-16 20:33:54 +000047
Clement Escoffier3e0db1e2009-01-15 15:35:17 +000048<h2><a name="ArchitectureHandler-Metadata"></a>Metadata</h2>
Clement Escoffier50254022008-05-16 20:33:54 +000049
Clement Escoffier3e0db1e2009-01-15 15:35:17 +000050<p>The architecture (i.e. instance introspection) is activated by default. To disable it, you need to add an attribute <em>"architecture=false"</em> to the component element:</p>
51<div class="code"><div class="codeContent">
52<pre class="code-xml"><span class="code-tag">&lt;component classname=<span class="code-quote">"fr.imag.adele.escoffier.hello.impl.HelloServiceImpl"</span> architecture=<span class="code-quote">"false"</span>&gt;</span></pre>
53</div></div>
54<p>By default, the architecture feature is enabled.</p>
Clement Escoffier50254022008-05-16 20:33:54 +000055
Clement Escoffier3e0db1e2009-01-15 15:35:17 +000056<h2><a name="ArchitectureHandler-The&quot;arch&quot;command"></a>The "arch" command</h2>
Clement Escoffier50254022008-05-16 20:33:54 +000057
Clement Escoffier3e0db1e2009-01-15 15:35:17 +000058<p>A Felix command comes with the architecture handler. This command
59looks for all component exposing the architecture and print the
60information.</p>
61<div class="code"><div class="codeContent">
62<pre class="code-java">arch =&gt; displays instances name &amp; state (equivalent to arch \-instances)
Clement Escoffier50254022008-05-16 20:33:54 +000063arch -instance $instance_name =&gt; displays complete information about the instance $instance_name
64arch -factories =&gt; display the list of available factories
Clement Escoffier130ca572008-10-13 07:33:03 +000065arch -factory $factory_name =&gt; display complete information about the factory $factory_name
Clement Escoffier3e0db1e2009-01-15 15:35:17 +000066arch -handlers =&gt; list available handlers</pre>
67</div></div>
Clement Escoffier50254022008-05-16 20:33:54 +000068
Clement Escoffier3e0db1e2009-01-15 15:35:17 +000069<p>More info on the <tt>arch</tt> command are available <a href="http://felix.apache.org/site/ipojo-arch-command.html" title="iPOJO-Arch-Command">here</a>.</p>
70
71<h2><a name="ArchitectureHandler-Technicalinformation"></a>Technical information</h2>
72
73<p>In fact, when a component enables the architecture introspection,
74its container exposes an Architecture service. Any architecture
75requester can obtain information about the instance. For example, the
76arch command requests all the architecture services and prints the
77information.</p>
78</td>
79<td class="confluenceTd" valign="top" width="20%">
80<h6><a name="ArchitectureHandler-Overview"></a><b>Overview</b></h6>
81<ul>
82 <li><a href="http://felix.apache.org/site/apache-felix-ipojo.html" title="Apache Felix iPOJO">Home Page</a></li>
83 <li><a href="http://felix.apache.org/site/apache-felix-ipojo-feature-overview.html" title="Apache Felix iPOJO Feature Overview">iPOJO Feature Overview</a></li>
84 <li><a href="http://felix.apache.org/site/download.html" title="Download">Download &amp; Install </a></li>
85</ul>
Clement Escoffier50254022008-05-16 20:33:54 +000086
87
Clement Escoffier3e0db1e2009-01-15 15:35:17 +000088<h6><a name="ArchitectureHandler-GettingStarted"></a><b>Getting Started</b></h6>
89<ul>
90 <li><a href="http://felix.apache.org/site/ipojo-in-10-minutes.html" title="iPOJO in 10 minutes">iPOJO in 10 minutes</a></li>
91 <li><a href="http://felix.apache.org/site/how-to-use-ipojo-annotations.html" title="How to use iPOJO Annotations">How to use iPOJO Annotations</a></li>
92 <li><a href="http://felix.apache.org/site/ipojo-hello-word-maven-based-tutorial.html" title="iPOJO Hello Word (Maven-Based) tutorial">iPOJO Hello Word (Maven-Based) tutorial</a></li>
93 <li><a href="http://felix.apache.org/site/ipojo-advanced-tutorial.html" title="iPOJO Advanced Tutorial">iPOJO Advanced Tutorial</a></li>
94 <li><a href="http://felix.apache.org/site/ipojo-composition-tutorial.html" title="iPOJO Composition Tutorial">iPOJO Composition Tutorial</a></li>
95</ul>
Clement Escoffier50254022008-05-16 20:33:54 +000096
97
Clement Escoffier3e0db1e2009-01-15 15:35:17 +000098<h6><a name="ArchitectureHandler-UserGuide"></a><b>User Guide</b></h6>
99<ul>
100 <li><a href="http://felix.apache.org/site/describing-components.html" title="Describing components">Describing components (handler list) </a></li>
101 <li><a href="http://felix.apache.org/site/using-xml-schemas.html" title="Using XML Schemas">Using XML Schemas</a></li>
102 <li><a href="http://felix.apache.org/site/apache-felix-ipojo-testing-components.html" title="apache-felix-ipojo-testing-components">Testing components</a></li>
103 <li><a href="http://felix.apache.org/site/ipojo-advanced-topics.html" title="iPOJO Advanced Topics">Advanced Topics</a></li>
104 <li><a href="http://felix.apache.org/site/ipojo-faq.html" title="iPOJO FAQ">FAQ</a></li>
105 <li><a href="http://felix.apache.org/site/ipojo-reference-card.html" title="iPOJO-Reference-Card">iPOJO Reference Card</a></li>
106</ul>
Clement Escoffier50254022008-05-16 20:33:54 +0000107
108
Clement Escoffier3e0db1e2009-01-15 15:35:17 +0000109<h6><a name="ArchitectureHandler-Tools"></a><b>Tools</b></h6>
110<ul>
111 <li><a href="http://felix.apache.org/site/ipojo-eclipse-plug-in.html" title="iPOJO Eclipse Plug-in">iPOJO Eclipse Plug-in</a></li>
112 <li><a href="http://felix.apache.org/site/ipojo-ant-task.html" title="iPOJO Ant Task">iPOJO Ant Task</a></li>
113 <li><a href="http://felix.apache.org/site/ipojo-maven-plug-in.html" title="iPOJO Maven Plug-in">iPOJO Maven Plug-in</a></li>
114 <li><a href="http://felix.apache.org/site/ipojo-arch-command.html" title="iPOJO-Arch-Command">iPOJO Arch Command</a></li>
115 <li><a href="http://felix.apache.org/site/apache-felix-ipojo-junit4osgi.html" title="apache-felix-ipojo-junit4osgi">Junit4OSGi</a></li>
116 <li><a href="http://felix.apache.org/site/ipojo-concepts-overview.html" title="iPOJO Concepts Overview">iPOJO concepts overview</a></li>
117</ul>
Clement Escoffier50254022008-05-16 20:33:54 +0000118
119
Clement Escoffier3e0db1e2009-01-15 15:35:17 +0000120<h6><a name="ArchitectureHandler-DeveloperGuide"></a><b>Developer Guide</b></h6>
121<ul>
122 <li>API: <span class="nobr"><a href="http://people.apache.org/%7Eclement/ipojo/api/1.0/" title="Visit page outside Confluence" rel="nofollow">1.0<sup><img class="rendericon" src="architecture-handler_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span></li>
123 <li><a href="http://felix.apache.org/site/how-to-write-your-own-handler.html" title="How to write your own handler">How to write your own handler</a></li>
124 <li><a href="http://felix.apache.org/site/how-to-use-ipojo-manipulation-metadata.html" title="How to use iPOJO Manipulation Metadata">How to use iPOJO Manipulation Metadata</a></li>
125 <li><a href="http://felix.apache.org/site/dive-into-the-ipojo-manipulation-depths.html" title="Dive into the iPOJO Manipulation depths">Dive into the iPOJO Manipulation depths</a></li>
126</ul>
Clement Escoffier50254022008-05-16 20:33:54 +0000127
128
Clement Escoffier3e0db1e2009-01-15 15:35:17 +0000129<h6><a name="ArchitectureHandler-Misc&amp;Contact"></a><b>Misc &amp; Contact</b></h6>
130<ul>
131 <li><a href="http://felix.apache.org/site/apache-felix-ipojo-issuestracker.html" title="apache-felix-ipojo-issuestracker">Issues Tracker</a></li>
132 <li><a href="http://felix.apache.org/site/apache-felix-ipojo-supportedvms.html" title="apache-felix-ipojo-supportedVMs">Supported JVMs</a></li>
133 <li><a href="http://felix.apache.org/site/apache-felix-ipojo-supportedosgi.html" title="apache-felix-ipojo-supportedOSGi">Supported OSGi Implementations</a></li>
134 <li><span class="nobr"><a href="http://ipojo-dark-side.blogspot.com/" title="Visit page outside Confluence" rel="nofollow">iPOJO's Dark Side Blog<sup><img class="rendericon" src="architecture-handler_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span></li>
135 <li><a href="http://felix.apache.org/site/future-ideas.html" title="Future Ideas">Future Ideas</a></li>
136 <li><a href="http://felix.apache.org/site/contact.html" title="Contact">Contact</a></li>
137 <li><a href="http://felix.apache.org/site/related-works.html" title="Related Works">Related Works</a></li>
138 <li><a href="http://felix.apache.org/site/article-presentations.html" title="Article &amp; Presentations">Article &amp; Presentations</a></li>
139</ul>
Clement Escoffier50254022008-05-16 20:33:54 +0000140
141
Clement Escoffier3e0db1e2009-01-15 15:35:17 +0000142<hr>
143<div class="" align="center">
144<p><span class="nobr"><a href="http://cwiki.apache.org/confluence/createrssfeed.action?types=blogpost&amp;statuses=created&amp;statuses=modified&amp;spaces=FELIX&amp;labelString=iPOJO&amp;rssType=atom&amp;maxResults=10&amp;timeSpan=5&amp;publicFeed=true&amp;title=iPOJO%20Atom%20Feed" title="Stay tuned!" rel="nofollow"><img src="architecture-handler_files/feed-icon-32x32.png" align="absmiddle" border="0"><sup><img class="rendericon" src="architecture-handler_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span></p></div>
Clement Escoffier50254022008-05-16 20:33:54 +0000145
Clement Escoffier3e0db1e2009-01-15 15:35:17 +0000146<script type="text/javascript">
147var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
148document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
149</script><script src="architecture-handler_files/ga.js" type="text/javascript"></script>
150<script type="text/javascript">
151var pageTracker = _gat._getTracker("UA-1518442-4");
152pageTracker._trackPageview();
153</script>
154</td></tr></tbody></table>
155 </div>
156 </body></html>