blob: 80fc52d0e57d1b02fd57505ff429109a8d3913c0 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>
<title>Apache Felix - iPOJO-Arch-Command</title>
<link rel="stylesheet" href="ipojo-arch-command_files/site.css" type="text/css" media="all">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head><body>
<div class="title"><div class="logo"><a href="http://felix.apache.org/site/index.html"><img alt="Apache Felix" src="ipojo-arch-command_files/logo.png" border="0"></a></div><div class="header"><a href="http://www.apache.org/"><img alt="Apache" src="ipojo-arch-command_files/apache.png" border="0"></a></div></div>
<div class="menu">
<ul>
<li><a href="http://felix.apache.org/site/news.html" title="news">news</a></li>
<li><a href="http://felix.apache.org/site/license.html" title="license">license</a></li>
<li><a href="http://felix.apache.org/site/downloads.cgi" rel="nofollow">downloads</a></li>
<li><a href="http://felix.apache.org/site/documentation.html" title="documentation">documentation</a></li>
<li><a href="http://felix.apache.org/site/mailinglists.html" title="mailinglists">mailing lists</a></li>
<li><a href="http://felix.apache.org/site/contributing.html" title="Contributing">contributing</a></li>
<li><a href="http://www.apache.org/" rel="nofollow">asf</a></li>
<li><a href="http://www.apache.org/foundation/sponsorship.html" rel="nofollow">sponsorship</a></li>
<li><a href="http://www.apache.org/foundation/thanks.html" rel="nofollow">sponsors</a>
<!-- ApacheCon Ad -->
<iframe src="ipojo-arch-command_files/button.html" style="border-width: 0pt; float: left;" scrolling="no" frameborder="0" height="135" width="135"></iframe>
<p style="height: 100px;">
<!-- ApacheCon Ad -->
</p></li></ul> </div>
<div class="main">
<style type="text/css">
@import url(http://people.apache.org/~clement/ipojo/site/superfish.css);
</style>
<style type="text/css">
@import url(http://people.apache.org/~clement/ipojo/site/style.css);
</style>
<p>
<script class="javascript" src="ipojo-arch-command_files/shCore.js"></script>
<script class="javascript" src="ipojo-arch-command_files/shBrushCSharp.js"></script>
<script class="javascript" src="ipojo-arch-command_files/shBrushPhp.js"></script>
<script class="javascript" src="ipojo-arch-command_files/shBrushJScript.js"></script>
<script class="javascript" src="ipojo-arch-command_files/shBrushVb.js"></script>
<script class="javascript" src="ipojo-arch-command_files/shBrushSql.js"></script>
<script class="javascript" src="ipojo-arch-command_files/shBrushXml.js"></script>
<script class="javascript" src="ipojo-arch-command_files/shBrushShell.js"></script>
<script class="javascript" src="ipojo-arch-command_files/shBrushDelphi.js"></script>
<script class="javascript" src="ipojo-arch-command_files/shBrushPython.js"></script>
<script class="javascript" src="ipojo-arch-command_files/shBrushJava.js"></script>
<script type="text/javascript" src="ipojo-arch-command_files/jquery-1.js"></script>
<script type="text/javascript" src="ipojo-arch-command_files/hoverIntent.js"></script>
<script type="text/javascript" src="ipojo-arch-command_files/superfish.js"></script>
<script type="text/javascript" src="ipojo-arch-command_files/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>
</p><div class="main">
<div class="page-header">
<img src="ipojo-arch-command_files/header.png" class="header">
<a href="http://ipojo.org/"><img src="ipojo-arch-command_files/ipojo.png" class="header-logo" width="225"></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><span class="sf-sub-indicator"> »</span></a>
<ul style="float: none; width: 14em; display: none; visibility: hidden;">
<li style="white-space: normal; float: left; width: 100%;">
<a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo.html" title="Apache Felix iPOJO">Home</a>
</li>
<li style="white-space: normal; float: left; width: 100%;">
<a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo-why-choose-ipojo.html" title="apache-felix-ipojo-why-choose-ipojo">Why choose iPOJO</a>
</li>
<li style="white-space: normal; float: left; width: 100%;">
<a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo-successstories.html" title="apache-felix-ipojo-successstories">Success stories</a>
</li>
<li style="white-space: normal; float: left; width: 100%;">
<a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo-feature-overview.html" title="Apache Felix iPOJO Feature Overview">Features</a>
</li>
</ul>
</li>
<li class="">
<!-- Menu download -->
</li><li>
<a href="http://felix.apache.org/site/download.html" title="Download">Download </a>
</li>
<li class="">
<!-- Menu Documentation -->
<a href="" class="sf-with-ul">Documentation<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
<ul style="float: none; width: 14em; display: none; visibility: hidden;">
<!-- sub- menu : getting started -->
<li style="white-space: normal; float: left; width: 100%;" class="">
<a style="float: none; width: auto;" href="" class="sf-with-ul">Getting Started<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
<ul style="left: 14em; float: none; width: 14em; display: none; visibility: hidden;">
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/ipojo-in-10-minutes.html" title="iPOJO in 10 minutes">iPOJO in 10 minutes</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/how-to-use-ipojo-annotations.html" title="How to use iPOJO Annotations">Using Annotations</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/ipojo-hello-word-maven-based-tutorial.html" title="iPOJO Hello Word (Maven-Based) tutorial">Maven tutorial</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/ipojo-advanced-tutorial.html" title="iPOJO Advanced Tutorial">Advanced tutorial</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo-dosgi.html" title="apache-felix-ipojo-dosgi">Using Distributed OSGi</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/ipojo-composition-tutorial.html" title="iPOJO Composition Tutorial">Application Composition</a></li>
</ul>
</li> <!-- end of getting started -->
<!-- sub menu : Describing Components -->
<li style="white-space: normal; float: left; width: 100%;" class="">
<a style="float: none; width: auto;" href="http://felix.apache.org/site/describing-components.html" class="sf-with-ul">Describing components<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
<ul style="left: 14em; float: none; width: 14em; display: none; visibility: hidden;">
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/service-requirement-handler.html" title="Service Requirement Handler">Requiring a service</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/providing-osgi-services.html" title="Providing OSGi services">Providing a service</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/lifecycle-callback-handler.html" title="Lifecycle Callback Handler">Lifecycle management</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/configuration-handler.html" title="Configuration Handler">Configuration</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/architecture-handler.html" title="Architecture Handler">Introspection</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/controller-lifecycle-handler.html" title="Controller Lifecycle Handler">Impacting the lifecycle</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/event-admin-handlers.html" title="Event Admin Handlers">Asynchronous communication</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/ipojo-jmx-handler.html" title="iPOJO JMX Handler">JMX management</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/extender-pattern-handler.html" title="Extender Pattern Handler">Extender pattern</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/white-board-pattern-handler.html" title="White Board Pattern Handler">Whiteboard pattern</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/temporal-service-dependency.html" title="Temporal Service Dependency">Temporal dependencies</a></li>
</ul>
</li> <!-- End of describing components -->
<!-- sub- menu : User Guide -->
<li style="white-space: normal; float: left; width: 100%;" class="">
<a style="float: none; width: auto;" href="" class="sf-with-ul">User Guide<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
<ul style="left: 14em; float: none; width: 14em; display: none; visibility: hidden;">
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/using-xml-schemas.html" title="Using XML Schemas">XML Schemas</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo-api.html" title="apache-felix-ipojo-api">API</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo-testing-components.html" title="apache-felix-ipojo-testing-components">Testing components</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.html" title="apache-felix-ipojo-eclipse-integration">Eclipse Integration</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/ipojo-faq.html" title="iPOJO FAQ">FAQ</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/ipojo-reference-card.html" title="iPOJO-Reference-Card">Reference Card</a></li>
</ul>
</li> <!-- end of user guide -->
<!-- sub- menu : Dev Guide -->
<li class="" style="white-space: normal; float: left; width: 100%;">
<a style="float: none; width: auto;" href="" class="sf-with-ul">Advanced Topics<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
<ul style="left: 14em; float: none; width: 14em; display: none; visibility: hidden;">
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/ipojo/api/1.2.0" rel="nofollow">Javadoc</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/how-to-write-your-own-handler.html" title="How to write your own handler">Handler development</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/how-to-use-ipojo-manipulation-metadata.html" title="How to use iPOJO Manipulation Metadata">Manipulation Metadata </a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" 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>
</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><span class="sf-sub-indicator"> »</span></a>
<ul style="float: none; width: 14em; display: none; visibility: hidden;">
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/ipojo-ant-task.html" title="iPOJO Ant Task">Ant Task</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/ipojo-eclipse-plug-in.html" title="iPOJO Eclipse Plug-in">Eclipse Plugin</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/ipojo-maven-plug-in.html" title="iPOJO Maven Plug-in">Maven Plugin</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="" title="iPOJO-Arch-Command"><tt>arch</tt> shell command</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo-online-manipulator.html" title="apache-felix-ipojo-online-manipulator">Online Manipulator</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/ipojo-webconsole-plugin.html" title="iPOJO Webconsole Plugin">Webconsole plugin</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo-junit4osgi.html" title="apache-felix-ipojo-junit4osgi">Junit4OSGi</a></li>
</ul>
</li><!-- End of tools -->
<!-- Menu 5 : Misc -->
<li class="">
<a href="" class="sf-with-ul">Misc<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
<ul style="float: none; width: 14em; display: none; visibility: hidden;">
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo-issuestracker.html" title="apache-felix-ipojo-issuestracker">Issues Tracker</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo-supportedvms.html" title="apache-felix-ipojo-supportedVMs">Supported JVMs</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/apache-felix-ipojo-supportedosgi.html" title="apache-felix-ipojo-supportedOSGi">Supported OSGi Implementations</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://ipojo-dark-side.blogspot.com/" rel="nofollow">iPOJO's Dark Side Blog</a></li>
<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" href="http://felix.apache.org/site/article-presentations.html" title="Article &amp; Presentations">Article &amp; Presentations</a></li>
</ul>
</li><!-- End of misc -->
</ul> <!-- End of the menu -->
</div> <!-- Page header -->
<div class="content">
<h1><a name="iPOJO-Arch-Command-iPOJO{{Arch}}command"></a>iPOJO <tt>Arch</tt> command</h1>
<p><em>Architecture introspection is required when the system doesn't
work as expected. In this case, having a quick access to instances
states and interconnection is a stringent requirement. The <tt>arch</tt> command allows getting these data from the Felix Shell and from the Equinox shell.</em></p>
<div class="toc">
<ul>
<li><a href="#iPOJO-Arch-Command-Download">Download</a></li>
<li><a href="#iPOJO-Arch-Command-Usage">Usage</a></li>
<li><a href="#iPOJO-Arch-Command-Readinginstancearchitecture">Reading instance architecture</a></li>
<li><a href="#iPOJO-Arch-Command-Listavailablefactories">List available factories</a></li>
<li><a href="#iPOJO-Arch-Command-Listavailablehandlers">List available handlers</a></li>
</ul></div>
<h2><a name="iPOJO-Arch-Command-Download"></a>Download</h2>
<p>The Felix command is available from the <a href="http://felix.apache.org/site/download.html" title="Download">Download</a> page and in the <tt>arch</tt> folder of the iPOJO trunk <a href="http://svn.apache.org/viewvc/felix/trunk/ipojo/arch" rel="nofollow">http://svn.apache.org/repos/asf/felix/trunk/ipojo/arch/</a>.<br>
The Equinox command sources are available <a href="http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-utils/arch-equinox/" rel="nofollow">http://svn.apache.org/repos/asf/felix/sandbox/clement/ipojo-utils/arch-equinox/</a>. To compile sources, just launch the <tt>mvn clean install</tt>.</p>
<h2><a name="iPOJO-Arch-Command-Usage"></a>Usage</h2>
<p>Once you get the bundle, just install and start it in the OSGi Framework shell:</p>
<div class="code">
<div class="dp-highlighter"><table class="dp-xml" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="line1"><span>start&nbsp;file:/BUNDLE_URL.jar&nbsp;</span></td></tr></tbody></table></div><textarea style="display: none;" name="newcodemacro" class="xml:nocontrols:nogutter" rows="10" readonly="readonly">start file:/BUNDLE_URL.jar</textarea>
<script class="javascript">
if(!window.newcodemacro_initialised)
{
window.newcodemacro_initialised = true;
window.oldonloadmethod = window.onload;
window.onload = function(){
dp.SyntaxHighlighter.HighlightAll('newcodemacro');
if(window.oldonloadmethod)
{
window.oldonloadmethod();
}
}
}
</script>
</div>
<div class="code">
<div class="dp-highlighter"><table class="dp-xml" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="line1"><span>install&nbsp;file:/BUNDLE_URL.jar&nbsp;</span></td></tr><tr><td class="line2">Bundle&nbsp;X&nbsp;installed&nbsp;</td></tr><tr><td class="line1">start&nbsp;X&nbsp;</td></tr></tbody></table></div><textarea style="display: none;" name="newcodemacro" class="xml:nocontrols:nogutter" rows="10" readonly="readonly">install file:/BUNDLE_URL.jar
Bundle X installed
start X</textarea>
<script class="javascript">
if(!window.newcodemacro_initialised)
{
window.newcodemacro_initialised = true;
window.oldonloadmethod = window.onload;
window.onload = function(){
dp.SyntaxHighlighter.HighlightAll('newcodemacro');
if(window.oldonloadmethod)
{
window.oldonloadmethod();
}
}
}
</script>
</div>
<p>Then, you can use it to introspect the system by launching the <tt>arch</tt> command.</p>
<div class="code">
<div class="dp-highlighter"><table class="dp-shell" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="line1"><span>arch&nbsp;=&gt;&nbsp;displays&nbsp;instances&nbsp;name&nbsp;&amp;&nbsp;state&nbsp;(equivalent&nbsp;to&nbsp;arch&nbsp;\-instances)&nbsp;</span></td></tr><tr><td class="line2">arch&nbsp;-instance&nbsp;$instance_name&nbsp;=&gt;&nbsp;displays&nbsp;complete&nbsp;information&nbsp;about&nbsp;the&nbsp;instance&nbsp;$instance_name&nbsp;</td></tr><tr><td class="line1">arch&nbsp;-factories&nbsp;=&gt;&nbsp;display&nbsp;the&nbsp;<span class="keyword">list</span><span>&nbsp;of&nbsp;available&nbsp;factories&nbsp;</span></td></tr><tr><td class="line2">arch&nbsp;-factory&nbsp;$factory_name&nbsp;=&gt;&nbsp;display&nbsp;complete&nbsp;information&nbsp;about&nbsp;the&nbsp;factory&nbsp;$factory_name&nbsp;</td></tr><tr><td class="line1">arch&nbsp;-handlers&nbsp;=&gt;&nbsp;<span class="keyword">list</span><span>&nbsp;available&nbsp;handlers&nbsp;</span></td></tr></tbody></table></div><textarea style="display: none;" name="newcodemacro" class="shell:nocontrols:nogutter" rows="10" readonly="readonly">arch =&gt; displays instances name &amp; state (equivalent to arch \-instances)
arch -instance $instance_name =&gt; displays complete information about the instance $instance_name
arch -factories =&gt; display the list of available factories
arch -factory $factory_name =&gt; display complete information about the factory $factory_name
arch -handlers =&gt; list available handlers</textarea>
<script class="javascript">
if(!window.newcodemacro_initialised)
{
window.newcodemacro_initialised = true;
window.oldonloadmethod = window.onload;
window.onload = function(){
dp.SyntaxHighlighter.HighlightAll('newcodemacro');
if(window.oldonloadmethod)
{
window.oldonloadmethod();
}
}
}
</script>
</div>
<h2><a name="iPOJO-Arch-Command-Readinginstancearchitecture"></a>Reading instance architecture </h2>
<p>When you launch the <tt>arch</tt> command, the list of created instances (enabling architecture introspection) is displayed.</p>
<div class="code">
<div class="dp-highlighter"><table class="dp-shell" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="line1"><span>-&gt;&nbsp;arch&nbsp;</span></td></tr><tr><td class="line2">Instance&nbsp;ArchCommand&nbsp;-&gt;&nbsp;valid&nbsp;</td></tr><tr><td class="line1">Instance&nbsp;spell.english.EnglishDictionary-0&nbsp;-&gt;&nbsp;valid&nbsp;</td></tr><tr><td class="line2">Instance&nbsp;spell.checker.SpellCheck-0&nbsp;-&gt;&nbsp;valid&nbsp;</td></tr><tr><td class="line1">Instance&nbsp;spell.gui.SpellCheckerGui-0&nbsp;-&gt;&nbsp;valid&nbsp;</td></tr></tbody></table></div><textarea style="display: none;" name="newcodemacro" class="shell:nocontrols:nogutter" rows="10" readonly="readonly">-&gt; arch
Instance ArchCommand -&gt; valid
Instance spell.english.EnglishDictionary-0 -&gt; valid
Instance spell.checker.SpellCheck-0 -&gt; valid
Instance spell.gui.SpellCheckerGui-0 -&gt; valid</textarea>
<script class="javascript">
if(!window.newcodemacro_initialised)
{
window.newcodemacro_initialised = true;
window.oldonloadmethod = window.onload;
window.onload = function(){
dp.SyntaxHighlighter.HighlightAll('newcodemacro');
if(window.oldonloadmethod)
{
window.oldonloadmethod();
}
}
}
</script>
</div>
<p>To get more information on an instance, launch <tt>arch -instance the_instance_name</tt></p>
<div class="code">
<div class="dp-highlighter"><table class="dp-shell" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="line1"><span>-&gt;&nbsp;arch&nbsp;-instance&nbsp;spell.checker.SpellCheck-0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr><tr><td class="line2">instance&nbsp;component.<span class="keyword">type</span><span>="spell.checker.SpellCheck"&nbsp;state="valid"&nbsp;bundle="8"&nbsp;name="spell.checker.SpellCheck-0"&nbsp;</span></td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;handler&nbsp;state="valid"&nbsp;name="org.apache.felix.ipojo.handlers.dependency.DependencyHandler"&nbsp;</td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;requires&nbsp;optional="<span class="keyword">false</span><span>"&nbsp;aggregate="</span><span class="keyword">false</span><span>"&nbsp;state="resolved"&nbsp;binding-policy="dynamic"&nbsp;specification="spell.services.DictionaryService"&nbsp;</span></td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;handler&nbsp;state="valid"&nbsp;name="org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler"&nbsp;</td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;provides&nbsp;service.id="36"&nbsp;state="registered"&nbsp;specifications="[spell.services.SpellChecker]"&nbsp;</td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;property&nbsp;value="spell.checker.SpellCheck"&nbsp;name="factory.name"&nbsp;</td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;property&nbsp;value="spell.checker.SpellCheck-0"&nbsp;name="instance.name"&nbsp;</td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;handler&nbsp;state="valid"&nbsp;name="org.apache.felix.ipojo.handlers.architecture.ArchitectureHandler"&nbsp;</td></tr></tbody></table></div><textarea style="display: none;" name="newcodemacro" class="shell:nocontrols:nogutter" rows="10" readonly="readonly">-&gt;
arch -instance spell.checker.SpellCheck-0 instance
component.type="spell.checker.SpellCheck" state="valid" bundle="8"
name="spell.checker.SpellCheck-0" handler state="valid"
name="org.apache.felix.ipojo.handlers.dependency.DependencyHandler"
requires optional="false" aggregate="false" state="resolved"
binding-policy="dynamic"
specification="spell.services.DictionaryService" handler state="valid"
name="org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler"
provides service.id="36" state="registered"
specifications="[spell.services.SpellChecker]" property
value="spell.checker.SpellCheck" name="factory.name" property
value="spell.checker.SpellCheck-0" name="instance.name" handler
state="valid"
name="org.apache.felix.ipojo.handlers.architecture.ArchitectureHandler"</textarea>
<script class="javascript">
if(!window.newcodemacro_initialised)
{
window.newcodemacro_initialised = true;
window.oldonloadmethod = window.onload;
window.onload = function(){
dp.SyntaxHighlighter.HighlightAll('newcodemacro');
if(window.oldonloadmethod)
{
window.oldonloadmethod();
}
}
}
</script>
</div>
<p>Instance architecture is organized as follows:<br>
On the first line, are displayed the component type (i.e. factory), the instance state (<tt>valid</tt> or <tt>invalid</tt>), the bundle from which the instance is created, and the instance name.<br>
Then, the information is organized handler by handler (a piece of
container). For each handler plugged on the instance can participate to
the instance architecture. For each handler its name (such as {{
org.apache.felix.ipojo.handlers.dependency.DependencyHandler}} for
iPOJO service dependencies, {{
org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler}}
for iPOJO service providing...) and the state (either <tt>valid</tt> or <tt>invalid</tt> are displayed. Remember that an instance is valid only and only if all plugged handlers are valid. <br>
The <tt>org.apache.felix.ipojo.handlers.dependency.DependencyHandler</tt>
provides data on service dependencies and more precisely on the state
of service dependencies. In the previous example, the dependency on {{
spell.services.DictionaryService}} was resolved. On the following
example, the same dependency is no more resolved:</p>
<div class="code">
<div class="dp-highlighter"><table class="dp-shell" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="line1"><span>instance&nbsp;component.</span><span class="keyword">type</span><span>="spell.checker.SpellCheck"&nbsp;state="invalid"&nbsp;bundle="8"&nbsp;name="spell.checker.SpellCheck-0"&nbsp;</span></td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;handler&nbsp;state="invalid"&nbsp;name="org.apache.felix.ipojo.handlers.dependency.DependencyHandler"&nbsp;</td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;requires&nbsp;optional="<span class="keyword">false</span><span>"&nbsp;aggregate="</span><span class="keyword">false</span><span>"&nbsp;state="unresolved"&nbsp;binding-policy="dynamic"&nbsp;specification="spell.services.DictionaryService"&nbsp;</span></td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;handler&nbsp;state="valid"&nbsp;name="org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler"&nbsp;</td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;provides&nbsp;state="unregistered"&nbsp;specifications="[spell.services.SpellChecker]"&nbsp;</td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;property&nbsp;value="spell.checker.SpellCheck"&nbsp;name="factory.name"&nbsp;</td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;property&nbsp;value="spell.checker.SpellCheck-0"&nbsp;name="instance.name"&nbsp;</td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;handler&nbsp;state="valid"&nbsp;name="org.apache.felix.ipojo.handlers.architecture.ArchitectureHandler"&nbsp;</td></tr></tbody></table></div><textarea style="display: none;" name="newcodemacro" class="shell:nocontrols:nogutter" rows="10" readonly="readonly">instance
component.type="spell.checker.SpellCheck" state="invalid" bundle="8"
name="spell.checker.SpellCheck-0" handler state="invalid"
name="org.apache.felix.ipojo.handlers.dependency.DependencyHandler"
requires optional="false" aggregate="false" state="unresolved"
binding-policy="dynamic"
specification="spell.services.DictionaryService" handler state="valid"
name="org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler"
provides state="unregistered"
specifications="[spell.services.SpellChecker]" property
value="spell.checker.SpellCheck" name="factory.name" property
value="spell.checker.SpellCheck-0" name="instance.name" handler
state="valid"
name="org.apache.felix.ipojo.handlers.architecture.ArchitectureHandler"</textarea>
<script class="javascript">
if(!window.newcodemacro_initialised)
{
window.newcodemacro_initialised = true;
window.oldonloadmethod = window.onload;
window.onload = function(){
dp.SyntaxHighlighter.HighlightAll('newcodemacro');
if(window.oldonloadmethod)
{
window.oldonloadmethod();
}
}
}
</script>
</div>
<p>Notes that, the instance also becomes invalid and that the provided service is unregistered.<br>
If the provider comes back, the dependency becomes <tt>resolved</tt> and the instance becomes <tt>valid</tt><br>
If an instance begins to use a service, the bound providers are described in the instance architecture:</p>
<div class="code">
<div class="dp-highlighter"><table class="dp-shell" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="line1"><span>-&gt;&nbsp;arch&nbsp;-instance&nbsp;spell.checker.SpellCheck-0&nbsp;&nbsp;</span></td></tr><tr><td class="line2">instance&nbsp;component.<span class="keyword">type</span><span>="spell.checker.SpellCheck"&nbsp;state="valid"&nbsp;bundle="8"&nbsp;name="spell.checker.SpellCheck-0"&nbsp;</span></td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;object&nbsp;name="spell.checker.SpellCheck@e222eb"&nbsp;</td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;handler&nbsp;state="valid"&nbsp;name="org.apache.felix.ipojo.handlers.dependency.DependencyHandler"&nbsp;</td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;requires&nbsp;optional="<span class="keyword">false</span><span>"&nbsp;aggregate="</span><span class="keyword">false</span><span>"&nbsp;state="resolved"&nbsp;binding-policy="dynamic"&nbsp;specification="spell.services.DictionaryService"&nbsp;</span></td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uses&nbsp;service.id="41"&nbsp;instance.name="spell.english.EnglishDictionary-0"&nbsp;</td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;handler&nbsp;state="valid"&nbsp;name="org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler"&nbsp;</td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;provides&nbsp;service.id="42"&nbsp;state="registered"&nbsp;specifications="[spell.services.SpellChecker]"&nbsp;</td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;property&nbsp;value="spell.checker.SpellCheck"&nbsp;name="factory.name"&nbsp;</td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;property&nbsp;value="spell.checker.SpellCheck-0"&nbsp;name="instance.name"&nbsp;</td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;handler&nbsp;state="valid"&nbsp;name="org.apache.felix.ipojo.handlers.architecture.ArchitectureHandler"&nbsp;</td></tr></tbody></table></div><textarea style="display: none;" name="newcodemacro" class="shell:nocontrols:nogutter" rows="10" readonly="readonly">-&gt;
arch -instance spell.checker.SpellCheck-0 instance
component.type="spell.checker.SpellCheck" state="valid" bundle="8"
name="spell.checker.SpellCheck-0" object
name="spell.checker.SpellCheck@e222eb" handler state="valid"
name="org.apache.felix.ipojo.handlers.dependency.DependencyHandler"
requires optional="false" aggregate="false" state="resolved"
binding-policy="dynamic"
specification="spell.services.DictionaryService" uses service.id="41"
instance.name="spell.english.EnglishDictionary-0" handler state="valid"
name="org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler"
provides service.id="42" state="registered"
specifications="[spell.services.SpellChecker]" property
value="spell.checker.SpellCheck" name="factory.name" property
value="spell.checker.SpellCheck-0" name="instance.name" handler
state="valid"
name="org.apache.felix.ipojo.handlers.architecture.ArchitectureHandler"</textarea>
<script class="javascript">
if(!window.newcodemacro_initialised)
{
window.newcodemacro_initialised = true;
window.oldonloadmethod = window.onload;
window.onload = function(){
dp.SyntaxHighlighter.HighlightAll('newcodemacro');
if(window.oldonloadmethod)
{
window.oldonloadmethod();
}
}
}
</script>
</div>
<p>In the previous case, the dependency on {{
spell.services.DictionaryService}} use the service 41 from the iPOJO
instance named {{ spell.english.EnglishDictionary-0}}<br>
You can also check created POJO objects (implementation class objet). Here, only one object was created (<tt>spell.checker.SpellCheck@e222eb</tt>).</p>
<h2><a name="iPOJO-Arch-Command-Listavailablefactories"></a>List available factories</h2>
<p>To list available factories (i.e. component types), launch the <tt>arch -factories</tt> command:</p>
<div class="code">
<div class="dp-highlighter"><table class="dp-shell" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="line1"><span>-&gt;&nbsp;arch&nbsp;-factories&nbsp;</span></td></tr><tr><td class="line2">Factory&nbsp;spell.checker.SpellCheck&nbsp;(VALID)&nbsp;</td></tr><tr><td class="line1">Factory&nbsp;spell.gui.SpellCheckerGui&nbsp;(VALID)&nbsp;</td></tr><tr><td class="line2">Factory&nbsp;spell.english.EnglishDictionary&nbsp;(VALID)&nbsp;</td></tr></tbody></table></div><textarea style="display: none;" name="newcodemacro" class="shell:nocontrols:nogutter" rows="10" readonly="readonly">-&gt; arch -factories
Factory spell.checker.SpellCheck (VALID)
Factory spell.gui.SpellCheckerGui (VALID)
Factory spell.english.EnglishDictionary (VALID)</textarea>
<script class="javascript">
if(!window.newcodemacro_initialised)
{
window.newcodemacro_initialised = true;
window.oldonloadmethod = window.onload;
window.onload = function(){
dp.SyntaxHighlighter.HighlightAll('newcodemacro');
if(window.oldonloadmethod)
{
window.oldonloadmethod();
}
}
}
</script>
</div>
<p>For each available (public) factories,the name and the sate are
displayed. A factory is valid if and only if all required handlers are
available. To get more information on a factory launch the <tt>arch -factory factory_name</tt> command:</p>
<div class="code">
<div class="dp-highlighter"><table class="dp-shell" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="line1"><span>factory&nbsp;implementation-class="spell.english.EnglishDictionary"&nbsp;state="valid"&nbsp;bundle="7"&nbsp;name="spell.english.EnglishDictionary"&nbsp;</span></td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;provides&nbsp;specification="spell.services.DictionaryService"&nbsp;</td></tr><tr><td class="line1">&nbsp;&nbsp;&nbsp;&nbsp;missinghandlers&nbsp;<span class="keyword">list</span><span>="[]"&nbsp;</span></td></tr><tr><td class="line2">&nbsp;&nbsp;&nbsp;&nbsp;requiredhandlers&nbsp;<span class="keyword">list</span><span>="[org.apache.felix.ipojo:provides,&nbsp;org.apache.felix.ipojo:architecture]"&nbsp;</span></td></tr></tbody></table></div><textarea style="display: none;" name="newcodemacro" class="shell:nocontrols:nogutter" rows="10" readonly="readonly">factory implementation-class="spell.english.EnglishDictionary" state="valid" bundle="7" name="spell.english.EnglishDictionary"
provides specification="spell.services.DictionaryService"
missinghandlers list="[]"
requiredhandlers list="[org.apache.felix.ipojo:provides, org.apache.felix.ipojo:architecture]"</textarea>
<script class="javascript">
if(!window.newcodemacro_initialised)
{
window.newcodemacro_initialised = true;
window.oldonloadmethod = window.onload;
window.onload = function(){
dp.SyntaxHighlighter.HighlightAll('newcodemacro');
if(window.oldonloadmethod)
{
window.oldonloadmethod();
}
}
}
</script>
</div>
<p>On the first line, you get the implementation class of the type, the
state of the factory, the bundle declaring the type and the name of the
type. Then you get the list of required and missing handlers.</p>
<h2><a name="iPOJO-Arch-Command-Listavailablehandlers"></a>List available handlers</h2>
<p>You can also list available handlers with the <tt>arch -handlers</tt> command.</p>
<div class="code">
<div class="dp-highlighter"><table class="dp-shell" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="line1"><span>-&gt;&nbsp;arch&nbsp;-handlers&nbsp;</span></td></tr><tr><td class="line2">Handler&nbsp;org.apache.felix.ipojo:controller&nbsp;(VALID)&nbsp;</td></tr><tr><td class="line1">Handler&nbsp;org.apache.felix.ipojo:callback&nbsp;(VALID)&nbsp;</td></tr><tr><td class="line2">Handler&nbsp;org.apache.felix.ipojo:requires&nbsp;(VALID)&nbsp;</td></tr><tr><td class="line1">Handler&nbsp;org.apache.felix.ipojo:provides&nbsp;(VALID)&nbsp;</td></tr><tr><td class="line2">Handler&nbsp;org.apache.felix.ipojo:properties&nbsp;(VALID)&nbsp;</td></tr><tr><td class="line1">Handler&nbsp;org.apache.felix.ipojo:architecture&nbsp;(VALID)&nbsp;</td></tr><tr><td class="line2">Handler&nbsp;org.apache.felix.ipojo.handler.whiteboard:wbp&nbsp;(VALID)&nbsp;</td></tr></tbody></table></div><textarea style="display: none;" name="newcodemacro" class="shell:nocontrols:nogutter" rows="10" readonly="readonly">-&gt; arch -handlers
Handler org.apache.felix.ipojo:controller (VALID)
Handler org.apache.felix.ipojo:callback (VALID)
Handler org.apache.felix.ipojo:requires (VALID)
Handler org.apache.felix.ipojo:provides (VALID)
Handler org.apache.felix.ipojo:properties (VALID)
Handler org.apache.felix.ipojo:architecture (VALID)
Handler org.apache.felix.ipojo.handler.whiteboard:wbp (VALID)</textarea>
<script class="javascript">
if(!window.newcodemacro_initialised)
{
window.newcodemacro_initialised = true;
window.oldonloadmethod = window.onload;
window.onload = function(){
dp.SyntaxHighlighter.HighlightAll('newcodemacro');
if(window.oldonloadmethod)
{
window.oldonloadmethod();
}
}
}
</script>
</div>
<p>Handlers with the <tt>org.apache.felix.ipojo</tt> namespace (section before <tt>:</tt>) are core handlers (provided by the iPOJO bundle). Others are external handlers (provided by others bundles).
<br clear="all">
<br clear="all"></p>
</div>
<img src="ipojo-arch-command_files/footer.png" class="footer">
</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 src="ipojo-arch-command_files/ga.js" type="text/javascript"></script>
<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-1518442-4");
pageTracker._trackPageview();
} catch(err) {}
</script>
</div>
</body><div FirebugVersion="1.4.0" style="display: none;" id="_firebugConsole"></div></html>