blob: ab204b19cb31ec25a93af86e8c500b0ed2af8e06 [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_75) on Tue Jun 09 23:29:44 CEST 2015 -->
<title>DependencyContext</title>
<meta name="date" content="2015-06-09">
<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="DependencyContext";
}
//-->
</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="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><a href="../../../../../org/apache/felix/dm/context/ComponentContext.html" title="interface in org.apache.felix.dm.context"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/felix/dm/context/Event.html" title="class in org.apache.felix.dm.context"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/felix/dm/context/DependencyContext.html" target="_top">Frames</a></li>
<li><a href="DependencyContext.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>Field&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>Field&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.dm.context</div>
<h2 title="Interface DependencyContext" class="title">Interface DependencyContext</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../../../org/apache/felix/dm/Dependency.html" title="interface in org.apache.felix.dm">Dependency</a></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../org/apache/felix/dm/context/AbstractDependency.html" title="class in org.apache.felix.dm.context">AbstractDependency</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">DependencyContext</span>
extends <a href="../../../../../org/apache/felix/dm/Dependency.html" title="interface in org.apache.felix.dm">Dependency</a></pre>
<div class="block">Every DependencyManager Dependency implementations must implement this interface.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><code>AbstractDependency} which already implements most of the methods from this interface.</code></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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/dm/context/DependencyContext.html#copyToCollection(java.util.Collection)">copyToCollection</a></strong>(java.util.Collection&lt;java.lang.Object&gt;&nbsp;coll)</code>
<div class="block">Copies all the dependency service instances to the given collection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#copyToMap(java.util.Map)">copyToMap</a></strong>(java.util.Map&lt;java.lang.Object,java.util.Dictionary&lt;?,?&gt;&gt;&nbsp;map)</code>
<div class="block">Copies all the dependency service instances to the given map (key = dependency service, value = dependency servie properties).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html" title="interface in org.apache.felix.dm.context">DependencyContext</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#createCopy()">createCopy</a></strong>()</code>
<div class="block">Creates a clone of this dependency.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Class&lt;?&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#getAutoConfigType()">getAutoConfigType</a></strong>()</code>
<div class="block">Returns the type of the field which can be injected with the dependency service.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/context/ComponentContext.html" title="interface in org.apache.felix.dm.context">ComponentContext</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#getComponentContext()">getComponentContext</a></strong>()</code>
<div class="block">Returns the Component implementation context associated to this Dependency context.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/felix/dm/context/Event.html" title="class in org.apache.felix.dm.context">Event</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#getService()">getService</a></strong>()</code>
<div class="block">Returns the highest ranked available dependency service instance, or null if the dependency is unavailable.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#invokeCallback(org.apache.felix.dm.context.EventType,%20org.apache.felix.dm.context.Event...)">invokeCallback</a></strong>(<a href="../../../../../org/apache/felix/dm/context/EventType.html" title="enum in org.apache.felix.dm.context">EventType</a>&nbsp;type,
<a href="../../../../../org/apache/felix/dm/context/Event.html" title="class in org.apache.felix.dm.context">Event</a>...&nbsp;events)</code>
<div class="block">The Component implementation asks this dependency to invoke a component dependency callback.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#isInstanceBound()">isInstanceBound</a></strong>()</code>
<div class="block">Is this dependency instance bound ?</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#isStarted()">isStarted</a></strong>()</code>
<div class="block">Returns true if the dependency has been started, false if not</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#needsInstance()">needsInstance</a></strong>()</code>
<div class="block">Does this dependency need the component instances to determine if the dependency is available or not.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#setAvailable(boolean)">setAvailable</a></strong>(boolean&nbsp;available)</code>
<div class="block">Sets this dependency as available, meaning that at least one dependency service is available.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#setComponentContext(org.apache.felix.dm.context.ComponentContext)">setComponentContext</a></strong>(<a href="../../../../../org/apache/felix/dm/context/ComponentContext.html" title="interface in org.apache.felix.dm.context">ComponentContext</a>&nbsp;component)</code>
<div class="block">Stores the Component implementation context in the Dependency Implementation.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#setInstanceBound(boolean)">setInstanceBound</a></strong>(boolean&nbsp;instanceBound)</code>
<div class="block">Sets this dependency as "instance bound".</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#start()">start</a></strong>()</code>
<div class="block">Invoked by the component context when the dependency should start working.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html#stop()">stop</a></strong>()</code>
<div class="block">Invoked by the component context when the dependency should stop working.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.felix.dm.Dependency">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.felix.dm.<a href="../../../../../org/apache/felix/dm/Dependency.html" title="interface in org.apache.felix.dm">Dependency</a></h3>
<code><a href="../../../../../org/apache/felix/dm/Dependency.html#getAutoConfigName()">getAutoConfigName</a>, <a href="../../../../../org/apache/felix/dm/Dependency.html#getProperties()">getProperties</a>, <a href="../../../../../org/apache/felix/dm/Dependency.html#isAutoConfig()">isAutoConfig</a>, <a href="../../../../../org/apache/felix/dm/Dependency.html#isAvailable()">isAvailable</a>, <a href="../../../../../org/apache/felix/dm/Dependency.html#isPropagated()">isPropagated</a>, <a href="../../../../../org/apache/felix/dm/Dependency.html#isRequired()">isRequired</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setComponentContext(org.apache.felix.dm.context.ComponentContext)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setComponentContext</h4>
<pre>void&nbsp;setComponentContext(<a href="../../../../../org/apache/felix/dm/context/ComponentContext.html" title="interface in org.apache.felix.dm.context">ComponentContext</a>&nbsp;component)</pre>
<div class="block">Stores the Component implementation context in the Dependency Implementation. This object is the entry point to
the Component implementation.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>component</code> - the Component implementation context</dd></dl>
</li>
</ul>
<a name="getComponentContext()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getComponentContext</h4>
<pre><a href="../../../../../org/apache/felix/dm/context/ComponentContext.html" title="interface in org.apache.felix.dm.context">ComponentContext</a>&nbsp;getComponentContext()</pre>
<div class="block">Returns the Component implementation context associated to this Dependency context.</div>
</li>
</ul>
<a name="invokeCallback(org.apache.felix.dm.context.EventType, org.apache.felix.dm.context.Event...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>invokeCallback</h4>
<pre>void&nbsp;invokeCallback(<a href="../../../../../org/apache/felix/dm/context/EventType.html" title="enum in org.apache.felix.dm.context">EventType</a>&nbsp;type,
<a href="../../../../../org/apache/felix/dm/context/Event.html" title="class in org.apache.felix.dm.context">Event</a>...&nbsp;events)</pre>
<div class="block">The Component implementation asks this dependency to invoke a component dependency callback.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - the type of the callback to invoke (add/change/remove/swap ...)</dd><dd><code>events</code> - the dependency service event(s) that has previously been submitted to the component implementation using
the ComponentContext.handleEvent method. The number of events depends on the event type: one event for ADDED/CHANGED/REMOVED,
and two events for the SWAPPED event.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/felix/dm/context/ComponentContext.html#handleEvent(org.apache.felix.dm.context.DependencyContext,%20org.apache.felix.dm.context.EventType,%20org.apache.felix.dm.context.Event...)"><code>ComponentContext.handleEvent(DependencyContext, EventType, Event...)</code></a>,
<a href="../../../../../org/apache/felix/dm/context/EventType.html" title="enum in org.apache.felix.dm.context"><code>EventType</code></a></dd></dl>
</li>
</ul>
<a name="start()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>void&nbsp;start()</pre>
<div class="block">Invoked by the component context when the dependency should start working.</div>
</li>
</ul>
<a name="stop()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stop</h4>
<pre>void&nbsp;stop()</pre>
<div class="block">Invoked by the component context when the dependency should stop working.</div>
</li>
</ul>
<a name="isStarted()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isStarted</h4>
<pre>boolean&nbsp;isStarted()</pre>
<div class="block">Returns true if the dependency has been started, false if not</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the dependency has been started, false if not</dd></dl>
</li>
</ul>
<a name="setAvailable(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAvailable</h4>
<pre>void&nbsp;setAvailable(boolean&nbsp;available)</pre>
<div class="block">Sets this dependency as available, meaning that at least one dependency service is available.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>available</code> - true to mark this dependency as available, false to mark it as unavailable</dd></dl>
</li>
</ul>
<a name="setInstanceBound(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setInstanceBound</h4>
<pre>void&nbsp;setInstanceBound(boolean&nbsp;instanceBound)</pre>
<div class="block">Sets this dependency as "instance bound". A dependency is "instance bound" if it is defined from the
component's init method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>true</code> - if the dependency has to be marked as "intance bound", false if not.</dd></dl>
</li>
</ul>
<a name="isInstanceBound()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isInstanceBound</h4>
<pre>boolean&nbsp;isInstanceBound()</pre>
<div class="block">Is this dependency instance bound ?</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if this dependency is instance bound, false if not</dd></dl>
</li>
</ul>
<a name="needsInstance()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>needsInstance</h4>
<pre>boolean&nbsp;needsInstance()</pre>
<div class="block">Does this dependency need the component instances to determine if the dependency is available or not.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the dependency need the component instances before it can be started, false if not.</dd></dl>
</li>
</ul>
<a name="getAutoConfigType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAutoConfigType</h4>
<pre>java.lang.Class&lt;?&gt;&nbsp;getAutoConfigType()</pre>
<div class="block">Returns the type of the field which can be injected with the dependency service.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the type of the field which can be injected with the dependency service, or null if the dependency does not
support auto config mode.</dd></dl>
</li>
</ul>
<a name="getService()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getService</h4>
<pre><a href="../../../../../org/apache/felix/dm/context/Event.html" title="class in org.apache.felix.dm.context">Event</a>&nbsp;getService()</pre>
<div class="block">Returns the highest ranked available dependency service instance, or null if the dependency is unavailable.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the highest ranked available dependency service instance, or null</dd></dl>
</li>
</ul>
<a name="copyToCollection(java.util.Collection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyToCollection</h4>
<pre>void&nbsp;copyToCollection(java.util.Collection&lt;java.lang.Object&gt;&nbsp;coll)</pre>
<div class="block">Copies all the dependency service instances to the given collection.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>coll</code> - the collection where the dependency service instances will be copied</dd></dl>
</li>
</ul>
<a name="copyToMap(java.util.Map)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyToMap</h4>
<pre>void&nbsp;copyToMap(java.util.Map&lt;java.lang.Object,java.util.Dictionary&lt;?,?&gt;&gt;&nbsp;map)</pre>
<div class="block">Copies all the dependency service instances to the given map (key = dependency service, value = dependency servie properties).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>map</code> - the map where the dependency service instances (with the corresponding service properties)</dd></dl>
</li>
</ul>
<a name="createCopy()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>createCopy</h4>
<pre><a href="../../../../../org/apache/felix/dm/context/DependencyContext.html" title="interface in org.apache.felix.dm.context">DependencyContext</a>&nbsp;createCopy()</pre>
<div class="block">Creates a clone of this dependency.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>a clone of this dependency.</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="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><a href="../../../../../org/apache/felix/dm/context/ComponentContext.html" title="interface in org.apache.felix.dm.context"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/felix/dm/context/Event.html" title="class in org.apache.felix.dm.context"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/felix/dm/context/DependencyContext.html" target="_top">Frames</a></li>
<li><a href="DependencyContext.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>Field&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>Field&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 ======= -->
</body>
</html>