blob: eebc516d012059af8577fa8f9f7a037684a9b1d5 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc (version 1.7.0_25) on Mon Jul 01 15:13:30 CEST 2013 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Component (Apache Felix Declarative Services 1.6.0 API)</title>
<meta name="date" content="2013-07-01">
<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="Component (Apache Felix Declarative Services 1.6.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="../../../../org/apache/felix/scr/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Component.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>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../org/apache/felix/scr/Reference.html" title="interface in org.apache.felix.scr"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/felix/scr/Component.html" target="_top">Frames</a></li>
<li><a href="Component.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.scr</div>
<h2 title="Interface Component" class="title">Interface Component</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="strong">Component</span></pre>
<div class="block">The <code>Component</code> interface represents a single component managed
by the Service Component Runtime. Management agents may access the Component
instances through the <a href="../../../../org/apache/felix/scr/ScrService.html" title="interface in org.apache.felix.scr"><code>ScrService</code></a>.</div>
</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/scr/Component.html#STATE_ACTIVATING">STATE_ACTIVATING</a></strong></code>
<div class="block">The Component is currently being activated either because it has been
enabled or because any dependency which was previously unsatisfied has
become satisfied (value is 8).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#STATE_ACTIVE">STATE_ACTIVE</a></strong></code>
<div class="block">The Component has successfully been activated and is fully functional
(value is 16).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#STATE_DEACTIVATING">STATE_DEACTIVATING</a></strong></code>
<div class="block">The Component is being deactivated either because it is being disabled
or because a dependency is not satisfied any more (value is 128).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#STATE_DESTROYED">STATE_DESTROYED</a></strong></code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>as of version 1.2 this constant has been renamed to
<a href="../../../../org/apache/felix/scr/Component.html#STATE_DISPOSED"><code>STATE_DISPOSED</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#STATE_DISABLED">STATE_DISABLED</a></strong></code>
<div class="block">The Component has just been created and is still disabled or it has
been disabled by calling the <a href="../../../../org/apache/felix/scr/Component.html#disable()"><code>disable()</code></a> method (value is 1).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#STATE_DISABLING">STATE_DISABLING</a></strong></code>
<div class="block">The Component is being disabled (value is 1024).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#STATE_DISPOSED">STATE_DISPOSED</a></strong></code>
<div class="block">The Component has been disposed off and cannot be used any more (value is
256).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#STATE_DISPOSING">STATE_DISPOSING</a></strong></code>
<div class="block">The Component is being disposed off (value is 2048).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#STATE_ENABLED">STATE_ENABLED</a></strong></code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>as of version 1.2 the enabled state is collapsed into the
<a href="../../../../org/apache/felix/scr/Component.html#STATE_UNSATISFIED"><code>STATE_UNSATISFIED</code></a> state. This status code is never returned
from the <a href="../../../../org/apache/felix/scr/Component.html#getState()"><code>getState()</code></a> method.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#STATE_ENABLING">STATE_ENABLING</a></strong></code>
<div class="block">The Component is being enabled (value is 512).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#STATE_FACTORY">STATE_FACTORY</a></strong></code>
<div class="block">The Component is a Component Factory ready to create Component instances
with the <code>ComponentFactory.newInstance(Dictionary)</code> method
or (if enabled with the <code>ds.factory.enabled</code> configuration) to
manage Component instances from configuration data received from the
Configuration Admin Service (value is 64).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#STATE_REGISTERED">STATE_REGISTERED</a></strong></code>
<div class="block">The Component has successfully been activated but is a Delayed or Service
Factory Component pending instantiation on first use (value is 32).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#STATE_UNSATISFIED">STATE_UNSATISFIED</a></strong></code>
<div class="block">The Component activation failed because any dependency is not satisfied
(value is 4).</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/scr/Component.html#disable()">disable</a></strong>()</code>
<div class="block">Disables this Component if it is enabled.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#enable()">enable</a></strong>()</code>
<div class="block">Enables this Component if it is disabled.</div>
</td>
</tr>
<tr class="altColor">
<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/scr/Component.html#getActivate()">getActivate</a></strong>()</code>
<div class="block">Returns the name of the method to be called when the component is being
activated.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>org.osgi.framework.Bundle</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#getBundle()">getBundle</a></strong>()</code>
<div class="block">Returns the <code>Bundle</code> declaring this component.</div>
</td>
</tr>
<tr class="altColor">
<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/scr/Component.html#getClassName()">getClassName</a></strong>()</code>
<div class="block">Returns the class name of the Component implementation.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>org.osgi.service.component.ComponentInstance</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#getComponentInstance()">getComponentInstance</a></strong>()</code>
<div class="block">Returns the <code>org.osgi.service.component.ComponentInstance</code>
representing this component or <code>null</code> if this component
is not been activated yet.</div>
</td>
</tr>
<tr class="altColor">
<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/scr/Component.html#getConfigurationPolicy()">getConfigurationPolicy</a></strong>()</code>
<div class="block">Reuturns the configuration policy declared in the component descriptor.</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/scr/Component.html#getDeactivate()">getDeactivate</a></strong>()</code>
<div class="block">Returns the name of the method to be called when the component is being
deactivated.</div>
</td>
</tr>
<tr class="altColor">
<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/scr/Component.html#getFactory()">getFactory</a></strong>()</code>
<div class="block">Returns the component factory name or <code>null</code> if this component
is not defined as a component factory.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#getId()">getId</a></strong>()</code>
<div class="block">Returns the component ID of this component.</div>
</td>
</tr>
<tr class="altColor">
<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/scr/Component.html#getModified()">getModified</a></strong>()</code>
<div class="block">Returns the name of the method to be called when the component
configuration has been updated or <code>null</code> if such a method is
not declared in the component descriptor.</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/scr/Component.html#getName()">getName</a></strong>()</code>
<div class="block">Returns the name of the component, which is also used as the service PID.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><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></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#getProperties()">getProperties</a></strong>()</code>
<div class="block">Returns the properties of the Component.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/felix/scr/Reference.html" title="interface in org.apache.felix.scr">Reference</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#getReferences()">getReferences</a></strong>()</code>
<div class="block">Returns an array of <a href="../../../../org/apache/felix/scr/Reference.html" title="interface in org.apache.felix.scr"><code>Reference</code></a> instances representing the service
references (or dependencies) of this Component.</div>
</td>
</tr>
<tr class="altColor">
<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/scr/Component.html#getServices()">getServices</a></strong>()</code>
<div class="block">Returns an array of service names provided by this Component or
<code>null</code> if the Component is not registered as a service.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#getState()">getState</a></strong>()</code>
<div class="block">Returns the current state of the Component, which is one of the
<code>STATE_*</code> constants defined in this interface.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#isActivateDeclared()">isActivateDeclared</a></strong>()</code>
<div class="block">Returns <code>true</code> if the name of the method to be called on
component activation (see <a href="../../../../org/apache/felix/scr/Component.html#getActivate()"><code>getActivate()</code></a> is declared in the
component descriptor or not.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#isDeactivateDeclared()">isDeactivateDeclared</a></strong>()</code>
<div class="block">Returns <code>true</code> if the name of the method to be called on
component deactivation (see <a href="../../../../org/apache/felix/scr/Component.html#getDeactivate()"><code>getDeactivate()</code></a> is declared in the
component descriptor or not.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#isDefaultEnabled()">isDefaultEnabled</a></strong>()</code>
<div class="block">Returns whether the Component is declared to be enabled initially.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#isImmediate()">isImmediate</a></strong>()</code>
<div class="block">Returns whether the Component is an Immediate or a Delayed Component.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/felix/scr/Component.html#isServiceFactory()">isServiceFactory</a></strong>()</code>
<div class="block">Returns <code>true</code> if this component is a service factory.</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="STATE_DISABLED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATE_DISABLED</h4>
<pre>static final&nbsp;int STATE_DISABLED</pre>
<div class="block">The Component has just been created and is still disabled or it has
been disabled by calling the <a href="../../../../org/apache/felix/scr/Component.html#disable()"><code>disable()</code></a> method (value is 1).</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_DISABLED">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STATE_ENABLING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATE_ENABLING</h4>
<pre>static final&nbsp;int STATE_ENABLING</pre>
<div class="block">The Component is being enabled (value is 512). After the component has
been enabled it enters the <a href="../../../../org/apache/felix/scr/Component.html#STATE_UNSATISFIED"><code>STATE_UNSATISFIED</code></a> state.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_ENABLING">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STATE_ENABLED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATE_ENABLED</h4>
<pre>static final&nbsp;int STATE_ENABLED</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>as of version 1.2 the enabled state is collapsed into the
<a href="../../../../org/apache/felix/scr/Component.html#STATE_UNSATISFIED"><code>STATE_UNSATISFIED</code></a> state. This status code is never returned
from the <a href="../../../../org/apache/felix/scr/Component.html#getState()"><code>getState()</code></a> method.</i></div>
<div class="block">The Component has been enabled and is now going to be activated (value
is 2).</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_ENABLED">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STATE_UNSATISFIED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATE_UNSATISFIED</h4>
<pre>static final&nbsp;int STATE_UNSATISFIED</pre>
<div class="block">The Component activation failed because any dependency is not satisfied
(value is 4).</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_UNSATISFIED">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STATE_ACTIVATING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATE_ACTIVATING</h4>
<pre>static final&nbsp;int STATE_ACTIVATING</pre>
<div class="block">The Component is currently being activated either because it has been
enabled or because any dependency which was previously unsatisfied has
become satisfied (value is 8).</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_ACTIVATING">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STATE_ACTIVE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATE_ACTIVE</h4>
<pre>static final&nbsp;int STATE_ACTIVE</pre>
<div class="block">The Component has successfully been activated and is fully functional
(value is 16). This is the state of immediate components after
successfull activation. Delayed and Service Factory Components enter
this state when the service instance has actually be instantiated because
the service has been acquired.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_ACTIVE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STATE_REGISTERED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATE_REGISTERED</h4>
<pre>static final&nbsp;int STATE_REGISTERED</pre>
<div class="block">The Component has successfully been activated but is a Delayed or Service
Factory Component pending instantiation on first use (value is 32).</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_REGISTERED">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STATE_FACTORY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATE_FACTORY</h4>
<pre>static final&nbsp;int STATE_FACTORY</pre>
<div class="block">The Component is a Component Factory ready to create Component instances
with the <code>ComponentFactory.newInstance(Dictionary)</code> method
or (if enabled with the <code>ds.factory.enabled</code> configuration) to
manage Component instances from configuration data received from the
Configuration Admin Service (value is 64).</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_FACTORY">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STATE_DEACTIVATING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATE_DEACTIVATING</h4>
<pre>static final&nbsp;int STATE_DEACTIVATING</pre>
<div class="block">The Component is being deactivated either because it is being disabled
or because a dependency is not satisfied any more (value is 128). After
deactivation the Component enters the <a href="../../../../org/apache/felix/scr/Component.html#STATE_UNSATISFIED"><code>STATE_UNSATISFIED</code></a> state.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_DEACTIVATING">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STATE_DISABLING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATE_DISABLING</h4>
<pre>static final&nbsp;int STATE_DISABLING</pre>
<div class="block">The Component is being disabled (value is 1024). After the component has
been disabled it enters the <a href="../../../../org/apache/felix/scr/Component.html#STATE_DISABLED"><code>STATE_DISABLED</code></a> state.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_DISABLING">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STATE_DISPOSING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATE_DISPOSING</h4>
<pre>static final&nbsp;int STATE_DISPOSING</pre>
<div class="block">The Component is being disposed off (value is 2048). After the component
has been disposed off it enters the <a href="../../../../org/apache/felix/scr/Component.html#STATE_DESTROYED"><code>STATE_DESTROYED</code></a> state.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_DISPOSING">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STATE_DESTROYED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATE_DESTROYED</h4>
<pre>static final&nbsp;int STATE_DESTROYED</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>as of version 1.2 this constant has been renamed to
<a href="../../../../org/apache/felix/scr/Component.html#STATE_DISPOSED"><code>STATE_DISPOSED</code></a>.</i></div>
<div class="block">The Component has been destroyed and cannot be used any more (value is
256). This state is only used when the bundle declaring the component
is being stopped and all components have to be removed.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_DESTROYED">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STATE_DISPOSED">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>STATE_DISPOSED</h4>
<pre>static final&nbsp;int STATE_DISPOSED</pre>
<div class="block">The Component has been disposed off and cannot be used any more (value is
256). This state is used when the bundle declaring the component
is being stopped and all components have to be removed. This status is
also the final status of a component after the
<code>ComponentInstance.dispose()</code> method has been called.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.felix.scr.Component.STATE_DISPOSED">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="getId()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getId</h4>
<pre>long&nbsp;getId()</pre>
<div class="block">Returns the component ID of this component. This ID is managed by the
SCR. If the component is not currently enabled the ID might not be
assigned to the component (yet) and this method will return -1 in this
case.</div>
</li>
</ul>
<a name="getName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</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;getName()</pre>
<div class="block">Returns the name of the component, which is also used as the service PID.
This method provides access to the <code>name</code> attribute of the
<code>component</code> element.</div>
</li>
</ul>
<a name="getState()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getState</h4>
<pre>int&nbsp;getState()</pre>
<div class="block">Returns the current state of the Component, which is one of the
<code>STATE_*</code> constants defined in this interface.</div>
</li>
</ul>
<a name="getBundle()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBundle</h4>
<pre>org.osgi.framework.Bundle&nbsp;getBundle()</pre>
<div class="block">Returns the <code>Bundle</code> declaring this component.</div>
</li>
</ul>
<a name="getFactory()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFactory</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;getFactory()</pre>
<div class="block">Returns the component factory name or <code>null</code> if this component
is not defined as a component factory. This method provides access to
the <code>factory</code> attribute of the <code>component</code>
element.</div>
</li>
</ul>
<a name="isServiceFactory()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isServiceFactory</h4>
<pre>boolean&nbsp;isServiceFactory()</pre>
<div class="block">Returns <code>true</code> if this component is a service factory. This
method returns the value of the <code>serviceFactory</code> attribute of
the <code>service</code> element. If the component has no service
element, this method returns <code>false</code>.</div>
</li>
</ul>
<a name="getClassName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassName</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;getClassName()</pre>
<div class="block">Returns the class name of the Component implementation. This method
provides access to the <code>class</code> attribute of the
<code>implementation</code> element.</div>
</li>
</ul>
<a name="isDefaultEnabled()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDefaultEnabled</h4>
<pre>boolean&nbsp;isDefaultEnabled()</pre>
<div class="block">Returns whether the Component is declared to be enabled initially. This
method provides access to the <code>enabled</code> attribute of the
<code>component</code> element.</div>
</li>
</ul>
<a name="isImmediate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isImmediate</h4>
<pre>boolean&nbsp;isImmediate()</pre>
<div class="block">Returns whether the Component is an Immediate or a Delayed Component.
This method provides access to the <code>immediate</code> attribute of
the <code>component</code> element.</div>
</li>
</ul>
<a name="getServices()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getServices</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;getServices()</pre>
<div class="block">Returns an array of service names provided by this Component or
<code>null</code> if the Component is not registered as a service. This
method provides access to the <code>interface</code> attributes of the
<code>provide</code> elements.</div>
</li>
</ul>
<a name="getProperties()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProperties</h4>
<pre><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;getProperties()</pre>
<div class="block">Returns the properties of the Component. The Dictionary returned is a
private copy of the actual properties and contains the same entries as
are used to register the Component as a service and are returned by
the <code>ComponentContext.getProperties()</code> method.</div>
</li>
</ul>
<a name="getReferences()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReferences</h4>
<pre><a href="../../../../org/apache/felix/scr/Reference.html" title="interface in org.apache.felix.scr">Reference</a>[]&nbsp;getReferences()</pre>
<div class="block">Returns an array of <a href="../../../../org/apache/felix/scr/Reference.html" title="interface in org.apache.felix.scr"><code>Reference</code></a> instances representing the service
references (or dependencies) of this Component. If the Component has no
references, <code>null</code> is returned.</div>
</li>
</ul>
<a name="getComponentInstance()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getComponentInstance</h4>
<pre>org.osgi.service.component.ComponentInstance&nbsp;getComponentInstance()</pre>
<div class="block">Returns the <code>org.osgi.service.component.ComponentInstance</code>
representing this component or <code>null</code> if this component
is not been activated yet.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd></dl>
</li>
</ul>
<a name="getActivate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getActivate</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;getActivate()</pre>
<div class="block">Returns the name of the method to be called when the component is being
activated.
<p>
This method never returns <code>null</code>, that is, if this method is
not declared in the component descriptor this method returns the
default value <i>activate</i>.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd></dl>
</li>
</ul>
<a name="isActivateDeclared()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isActivateDeclared</h4>
<pre>boolean&nbsp;isActivateDeclared()</pre>
<div class="block">Returns <code>true</code> if the name of the method to be called on
component activation (see <a href="../../../../org/apache/felix/scr/Component.html#getActivate()"><code>getActivate()</code></a> is declared in the
component descriptor or not.
<p>
For a component declared in a Declarative Services 1.0 descriptor, this
method always returns <code>false</code>.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd></dl>
</li>
</ul>
<a name="getDeactivate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDeactivate</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;getDeactivate()</pre>
<div class="block">Returns the name of the method to be called when the component is being
deactivated.
<p>
This method never returns <code>null</code>, that is, if this method is
not declared in the component descriptor this method returns the
default value <i>deactivate</i>.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd></dl>
</li>
</ul>
<a name="isDeactivateDeclared()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDeactivateDeclared</h4>
<pre>boolean&nbsp;isDeactivateDeclared()</pre>
<div class="block">Returns <code>true</code> if the name of the method to be called on
component deactivation (see <a href="../../../../org/apache/felix/scr/Component.html#getDeactivate()"><code>getDeactivate()</code></a> is declared in the
component descriptor or not.
<p>
For a component declared in a Declarative Services 1.0 descriptor, this
method always returns <code>false</code>.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd></dl>
</li>
</ul>
<a name="getModified()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getModified</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;getModified()</pre>
<div class="block">Returns the name of the method to be called when the component
configuration has been updated or <code>null</code> if such a method is
not declared in the component descriptor.
<p>
For a component declared in a Declarative Services 1.0 descriptor, this
method always returns <code>null</code>.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd></dl>
</li>
</ul>
<a name="getConfigurationPolicy()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConfigurationPolicy</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;getConfigurationPolicy()</pre>
<div class="block">Reuturns the configuration policy declared in the component descriptor.
If the component descriptor is a Declarative Services 1.0 descriptor or
not configuration poliy has been declared, the default value
<i>optional</i> is returned.
<p>
The returned string is one of the three policies defined in the
Declarative Services specification 1.1:
<dl>
<dt>optional</dt>
<dd>Configuration from the Configuration Admin service is supplied to
the component if available. Otherwise the component is activated without
Configuration Admin configuration. This is the default value reflecting
the behaviour of Declarative Services 1.0</dd>
<dt>require</dt>
<dd>Configuration is required. The component remains unsatisfied until
configuartion is available from the Configuration Admin service.</dd>
<dt>ignore</dt>
<dd>Configuration is ignored. No Configuration Admin service
configuration is supplied to the component.</dd>
</dl></div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd></dl>
</li>
</ul>
<a name="enable()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>enable</h4>
<pre>void&nbsp;enable()</pre>
<div class="block">Enables this Component if it is disabled. If the Component is not
currently <a href="../../../../org/apache/felix/scr/Component.html#STATE_DISABLED"><code>disabled</code></a> this method has no effect. If
the Component is <a href="../../../../org/apache/felix/scr/Component.html#STATE_DESTROYED"><code>destroyed</code></a>, this method throws
an <code>IllegalStateException</code>.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If the Component is destroyed.</dd></dl>
</li>
</ul>
<a name="disable()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>disable</h4>
<pre>void&nbsp;disable()</pre>
<div class="block">Disables this Component if it is enabled. If the Component is already
<a href="../../../../org/apache/felix/scr/Component.html#STATE_DISABLED"><code>disabled</code></a> this method has no effect. If the
Component is <a href="../../../../org/apache/felix/scr/Component.html#STATE_DESTROYED"><code>destroyed</code></a>, this method throws an
<code>IllegalStateException</code>.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If the Component is destroyed.</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="../../../../org/apache/felix/scr/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Component.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>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../org/apache/felix/scr/Reference.html" title="interface in org.apache.felix.scr"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/felix/scr/Component.html" target="_top">Frames</a></li>
<li><a href="Component.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; 2006&#x2013;2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>