Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 2 | <html><head> |
| 3 | |
| 4 | |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 5 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 6 | <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 Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 22 | <!-- ApacheCon Ad --> |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 23 | <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 Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 31 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 32 | <p>The architecture feature allows obtaining an architectural / |
| 33 | component view of your systems. It exposes a snapshot of the present |
| 34 | instances & factories, the state of these instances ...<br> |
| 35 | Moreover; iPOJO defines an 'arch' command displaying this architecture |
| 36 | in Felix. You need to install the arch command bundle available in the |
| 37 | Felix trunk.</p> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 38 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 39 | <h2><a name="ArchitectureHandler-Reflectiononthecomponent"></a>Reflection on the component</h2> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 40 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 41 | <p>The architecture feature does "reflection" on the iPOJO containers. |
| 42 | It gathers information about the component (state, class name ...), |
| 43 | requirement (state, multiple, optional ...), provided services (state, |
| 44 | properties) ... Each handler can participate to the architecture. This |
| 45 | information allows you to know why an instance does not start, or why |
| 46 | the component does not publish / provide a service.</p> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 47 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 48 | <h2><a name="ArchitectureHandler-Metadata"></a>Metadata</h2> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 49 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 50 | <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"><component classname=<span class="code-quote">"fr.imag.adele.escoffier.hello.impl.HelloServiceImpl"</span> architecture=<span class="code-quote">"false"</span>></span></pre> |
| 53 | </div></div> |
| 54 | <p>By default, the architecture feature is enabled.</p> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 55 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 56 | <h2><a name="ArchitectureHandler-The"arch"command"></a>The "arch" command</h2> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 57 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 58 | <p>A Felix command comes with the architecture handler. This command |
| 59 | looks for all component exposing the architecture and print the |
| 60 | information.</p> |
| 61 | <div class="code"><div class="codeContent"> |
| 62 | <pre class="code-java">arch => displays instances name & state (equivalent to arch \-instances) |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 63 | arch -instance $instance_name => displays complete information about the instance $instance_name |
| 64 | arch -factories => display the list of available factories |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 65 | arch -factory $factory_name => display complete information about the factory $factory_name |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 66 | arch -handlers => list available handlers</pre> |
| 67 | </div></div> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 68 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 69 | <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, |
| 74 | its container exposes an Architecture service. Any architecture |
| 75 | requester can obtain information about the instance. For example, the |
| 76 | arch command requests all the architecture services and prints the |
| 77 | information.</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 & Install </a></li> |
| 85 | </ul> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 86 | |
| 87 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 88 | <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 Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 96 | |
| 97 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 98 | <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 Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 107 | |
| 108 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 109 | <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 Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 118 | |
| 119 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 120 | <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 Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 127 | |
| 128 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 129 | <h6><a name="ArchitectureHandler-Misc&Contact"></a><b>Misc & 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 & Presentations">Article & Presentations</a></li> |
| 139 | </ul> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 140 | |
| 141 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 142 | <hr> |
| 143 | <div class="" align="center"> |
| 144 | <p><span class="nobr"><a href="http://cwiki.apache.org/confluence/createrssfeed.action?types=blogpost&statuses=created&statuses=modified&spaces=FELIX&labelString=iPOJO&rssType=atom&maxResults=10&timeSpan=5&publicFeed=true&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 Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 145 | |
Clement Escoffier | 3e0db1e | 2009-01-15 15:35:17 +0000 | [diff] [blame] | 146 | <script type="text/javascript"> |
| 147 | var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); |
| 148 | document.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"> |
| 151 | var pageTracker = _gat._getTracker("UA-1518442-4"); |
| 152 | pageTracker._trackPageview(); |
| 153 | </script> |
| 154 | </td></tr></tbody></table> |
| 155 | </div> |
| 156 | </body></html> |