blob: 210157b2a2e9a9800bbeff6690b7366047d0ddb3 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_25) on Sat May 17 12:14:24 CEST 2014 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>ComponentInstance (Apache Felix iPOJO ~ JavaDoc 1.12.0 API)</title>
<meta name="date" content="2014-05-17">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ComponentInstance (Apache Felix iPOJO ~ JavaDoc 1.12.0 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ComponentInstance.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/felix/ipojo/ComponentFactory.html" title="class in org.apache.felix.ipojo"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/felix/ipojo/ConfigurationException.html" title="class in org.apache.felix.ipojo"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/felix/ipojo/ComponentInstance.html" target="_top">Frames</a></li>
<li><a href="ComponentInstance.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.felix.ipojo</div>
<h2 title="Interface ComponentInstance" class="title">Interface ComponentInstance</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../org/apache/felix/ipojo/composite/CompositeManager.html" title="class in org.apache.felix.ipojo.composite">CompositeManager</a>, <a href="../../../../org/apache/felix/ipojo/HandlerManager.html" title="class in org.apache.felix.ipojo">HandlerManager</a>, <a href="../../../../org/apache/felix/ipojo/InstanceManager.html" title="class in org.apache.felix.ipojo">InstanceManager</a></dd>
</dl>
<hr>
<br>
<pre>public interface <a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.30">ComponentInstance</a></pre>
<div class="block">This class defines the iPOJO's component instance concept.</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd><a href="mailto:dev@felix.apache.org">Felix Project Team</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#DISPOSED">DISPOSED</a></strong></code>
<div class="block">Component Instance State : DISPOSED.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#INVALID">INVALID</a></strong></code>
<div class="block">Component Instance State : INVALID.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#STOPPED">STOPPED</a></strong></code>
<div class="block">Component Instance State : STOPPED.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#VALID">VALID</a></strong></code>
<div class="block">Component Instance State : VALID.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#addInstanceStateListener(org.apache.felix.ipojo.InstanceStateListener)">addInstanceStateListener</a></strong>(<a href="../../../../org/apache/felix/ipojo/InstanceStateListener.html" title="interface in org.apache.felix.ipojo">InstanceStateListener</a>&nbsp;listener)</code>
<div class="block">Adds an instance state listener on the current instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#dispose()">dispose</a></strong>()</code>
<div class="block">Disposes the component instance.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>BundleContext</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#getContext()">getContext</a></strong>()</code>
<div class="block">Returns the bundle context of this instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/felix/ipojo/ComponentFactory.html" title="class in org.apache.felix.ipojo">ComponentFactory</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#getFactory()">getFactory</a></strong>()</code>
<div class="block">Returns the factory who created this instance.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/felix/ipojo/architecture/InstanceDescription.html" title="class in org.apache.felix.ipojo.architecture">InstanceDescription</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#getInstanceDescription()">getInstanceDescription</a></strong>()</code>
<div class="block">Returns the instance description.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#getInstanceName()">getInstanceName</a></strong>()</code>
<div class="block">Returns the name of the instance.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#getState()">getState</a></strong>()</code>
<div class="block">Returns the actual state of the instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#isStarted()">isStarted</a></strong>()</code>
<div class="block">Checks if the instance is started.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#reconfigure(java.util.Dictionary)">reconfigure</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Dictionary.html?is-external=true" title="class or interface in java.util">Dictionary</a>&nbsp;configuration)</code>
<div class="block">Re-configures an instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#removeInstanceStateListener(org.apache.felix.ipojo.InstanceStateListener)">removeInstanceStateListener</a></strong>(<a href="../../../../org/apache/felix/ipojo/InstanceStateListener.html" title="interface in org.apache.felix.ipojo">InstanceStateListener</a>&nbsp;listener)</code>
<div class="block">Removes an instance state listener on the current instance.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#start()">start</a></strong>()</code>
<div class="block">Starts the component instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#stop()">stop</a></strong>()</code>
<div class="block">Stops the component instance.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DISPOSED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DISPOSED</h4>
<pre>static final&nbsp;int <a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.35">DISPOSED</a></pre>
<div class="block">Component Instance State : DISPOSED. The component instance was disposed.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.ipojo.ComponentInstance.DISPOSED">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STOPPED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STOPPED</h4>
<pre>static final&nbsp;int <a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.41">STOPPED</a></pre>
<div class="block">Component Instance State : STOPPED. The component instance is not
started.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.ipojo.ComponentInstance.STOPPED">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="INVALID">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>INVALID</h4>
<pre>static final&nbsp;int <a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.47">INVALID</a></pre>
<div class="block">Component Instance State : INVALID. The component instance is invalid when it
starts or when a component dependency is invalid.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.ipojo.ComponentInstance.INVALID">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="VALID">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>VALID</h4>
<pre>static final&nbsp;int <a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.53">VALID</a></pre>
<div class="block">Component Instance State : VALID. The component instance is resolved when it is
running and all its attached handlers are valid.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.ipojo.ComponentInstance.VALID">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="start()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>void&nbsp;<a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.58">start</a>()</pre>
<div class="block">Starts the component instance.</div>
</li>
</ul>
<a name="stop()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stop</h4>
<pre>void&nbsp;<a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.64">stop</a>()</pre>
<div class="block">Stops the component instance.
A stopped instance can be re-started.</div>
</li>
</ul>
<a name="dispose()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dispose</h4>
<pre>void&nbsp;<a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.70">dispose</a>()</pre>
<div class="block">Disposes the component instance.
A disposed instance cannot be re-started.</div>
</li>
</ul>
<a name="getState()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getState</h4>
<pre>int&nbsp;<a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.76">getState</a>()</pre>
<div class="block">Returns the actual state of the instance.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the actual state of the component instance.</dd></dl>
</li>
</ul>
<a name="getInstanceDescription()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInstanceDescription</h4>
<pre><a href="../../../../org/apache/felix/ipojo/architecture/InstanceDescription.html" title="class in org.apache.felix.ipojo.architecture">InstanceDescription</a>&nbsp;<a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.82">getInstanceDescription</a>()</pre>
<div class="block">Returns the instance description.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the instance description of the current instance</dd></dl>
</li>
</ul>
<a name="getFactory()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFactory</h4>
<pre><a href="../../../../org/apache/felix/ipojo/ComponentFactory.html" title="class in org.apache.felix.ipojo">ComponentFactory</a>&nbsp;<a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.88">getFactory</a>()</pre>
<div class="block">Returns the factory who created this instance.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the factory of the component instance.</dd></dl>
</li>
</ul>
<a name="getContext()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContext</h4>
<pre>BundleContext&nbsp;<a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.94">getContext</a>()</pre>
<div class="block">Returns the bundle context of this instance.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the context of the component instance</dd></dl>
</li>
</ul>
<a name="getInstanceName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInstanceName</h4>
<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.100">getInstanceName</a>()</pre>
<div class="block">Returns the name of the instance.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the name of the component instance</dd></dl>
</li>
</ul>
<a name="isStarted()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isStarted</h4>
<pre>boolean&nbsp;<a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.107">isStarted</a>()</pre>
<div class="block">Checks if the instance is started.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if <a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#getState()"><code>getState()</code></a>
returns <a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#INVALID"><code>INVALID</code></a> or <a href="../../../../org/apache/felix/ipojo/ComponentInstance.html#VALID"><code>VALID</code></a>.</dd></dl>
</li>
</ul>
<a name="reconfigure(java.util.Dictionary)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reconfigure</h4>
<pre>void&nbsp;<a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.114">reconfigure</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Dictionary.html?is-external=true" title="class or interface in java.util">Dictionary</a>&nbsp;configuration)</pre>
<div class="block">Re-configures an instance. Do nothing if the instance does not support
dynamic reconfiguration. The reconfiguration does not stop the instance.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>configuration</code> - the new configuration.</dd></dl>
</li>
</ul>
<a name="addInstanceStateListener(org.apache.felix.ipojo.InstanceStateListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addInstanceStateListener</h4>
<pre>void&nbsp;<a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.120">addInstanceStateListener</a>(<a href="../../../../org/apache/felix/ipojo/InstanceStateListener.html" title="interface in org.apache.felix.ipojo">InstanceStateListener</a>&nbsp;listener)</pre>
<div class="block">Adds an instance state listener on the current instance.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>listener</code> - the listener to add.</dd></dl>
</li>
</ul>
<a name="removeInstanceStateListener(org.apache.felix.ipojo.InstanceStateListener)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>removeInstanceStateListener</h4>
<pre>void&nbsp;<a href="../../../../src-html/org/apache/felix/ipojo/ComponentInstance.html#line.126">removeInstanceStateListener</a>(<a href="../../../../org/apache/felix/ipojo/InstanceStateListener.html" title="interface in org.apache.felix.ipojo">InstanceStateListener</a>&nbsp;listener)</pre>
<div class="block">Removes an instance state listener on the current instance.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>listener</code> - the listener to remove.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ComponentInstance.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/felix/ipojo/ComponentFactory.html" title="class in org.apache.felix.ipojo"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/felix/ipojo/ConfigurationException.html" title="class in org.apache.felix.ipojo"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/felix/ipojo/ComponentInstance.html" target="_top">Frames</a></li>
<li><a href="ComponentInstance.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2014. All rights reserved.</small></p>
</body>
</html>