blob: 257685647af842b48b4be5f1e131e209d3f41005 [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:25 CEST 2014 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>ServiceReferenceUtils (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="ServiceReferenceUtils (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/ServiceReferenceUtils.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/dependency/impl/ServiceReferenceManager.RankingResult.html" title="class in org.apache.felix.ipojo.dependency.impl"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../org/apache/felix/ipojo/dependency/impl/TransformedServiceReferenceImpl.html" title="class in org.apache.felix.ipojo.dependency.impl"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html" target="_top">Frames</a></li>
<li><a href="ServiceReferenceUtils.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><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&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.dependency.impl</div>
<h2 title="Class ServiceReferenceUtils" class="title">Class ServiceReferenceUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.felix.ipojo.dependency.impl.ServiceReferenceUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <a href="../../../../../../src-html/org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#line.33">ServiceReferenceUtils</a>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Some utility methods to handle service references.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../../org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#ServiceReferenceUtils()">ServiceReferenceUtils</a></strong>()</code>&nbsp;</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>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#containsReferenceById(java.util.List, ServiceReference)">containsReferenceById</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends ServiceReference&gt;&nbsp;references,
ServiceReference&nbsp;ref)</code>
<div class="block">Checks whether a list of service references contains a reference with the same service.id as the
given reference.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static ServiceReference</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#getServiceReferenceById(java.util.List, ServiceReference)">getServiceReferenceById</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends ServiceReference&gt;&nbsp;references,
ServiceReference&nbsp;ref)</code>
<div class="block">Gets a service reference with the same service.id as the given reference from the given list.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#haveSameProperties(ServiceReference, ServiceReference)">haveSameProperties</a></strong>(ServiceReference&nbsp;ref1,
ServiceReference&nbsp;ref2)</code>
<div class="block">Checks whether the two references has the same properties and their value are equals.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#haveSameServiceId(ServiceReference, ServiceReference)">haveSameServiceId</a></strong>(ServiceReference&nbsp;ref1,
ServiceReference&nbsp;ref2)</code>
<div class="block">Checks whether two service references have the same service id.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#match(Filter, ServiceReference)">match</a></strong>(Filter&nbsp;filter,
ServiceReference&nbsp;ref)</code>
<div class="block">Checks if the given service reference match the current filter.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <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/dependency/impl/ServiceReferenceUtils.html#toString(java.util.Collection)">toString</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends ServiceReference&gt;&nbsp;references)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="ServiceReferenceUtils()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ServiceReferenceUtils</h4>
<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#line.33">ServiceReferenceUtils</a>()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="match(Filter, ServiceReference)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>match</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#line.43">match</a>(Filter&nbsp;filter,
ServiceReference&nbsp;ref)</pre>
<div class="block">Checks if the given service reference match the current filter.
This method aims to avoid calling <a href="http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/Filter.html?is-external=true#match(org.osgi.framework.ServiceReference)" title="class or interface in org.osgi.framework"><code>Filter</code></a>
method when manipulating a composite reference. In fact, this method thrown
a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang"><code>ClassCastException</code></a> on Equinox.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ref</code> - the service reference to check.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the service reference matches.</dd></dl>
</li>
</ul>
<a name="containsReferenceById(java.util.List, ServiceReference)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsReferenceById</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#line.64">containsReferenceById</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends ServiceReference&gt;&nbsp;references,
ServiceReference&nbsp;ref)</pre>
<div class="block">Checks whether a list of service references contains a reference with the same service.id as the
given reference.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>references</code> - the list of reference</dd><dd><code>ref</code> - the reference</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if references contains a reference with the same service.id as ref.</dd></dl>
</li>
</ul>
<a name="getServiceReferenceById(java.util.List, ServiceReference)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getServiceReferenceById</h4>
<pre>public static&nbsp;ServiceReference&nbsp;<a href="../../../../../../src-html/org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#line.75">getServiceReferenceById</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends ServiceReference&gt;&nbsp;references,
ServiceReference&nbsp;ref)</pre>
<div class="block">Gets a service reference with the same service.id as the given reference from the given list.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>references</code> - the list of references</dd><dd><code>ref</code> - the reference</dd>
<dt><span class="strong">Returns:</span></dt><dd>the service reference from references having the same service.id as ref. null if there is
no such reference in the list.</dd></dl>
</li>
</ul>
<a name="haveSameProperties(ServiceReference, ServiceReference)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>haveSameProperties</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#line.92">haveSameProperties</a>(ServiceReference&nbsp;ref1,
ServiceReference&nbsp;ref2)</pre>
<div class="block">Checks whether the two references has the same properties and their value are equals.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ref1</code> - first reference</dd><dd><code>ref2</code> - second reference</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the two references have the same properties and their values are equals.</dd></dl>
</li>
</ul>
<a name="haveSameServiceId(ServiceReference, ServiceReference)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>haveSameServiceId</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html#line.124">haveSameServiceId</a>(ServiceReference&nbsp;ref1,
ServiceReference&nbsp;ref2)</pre>
<div class="block">Checks whether two service references have the same service id.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ref1</code> - first reference</dd><dd><code>ref2</code> - second reference</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the two references have the same service.id, false otherwise.</dd></dl>
</li>
</ul>
<a name="toString(java.util.Collection)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<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/dependency/impl/ServiceReferenceUtils.html#line.129">toString</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends ServiceReference&gt;&nbsp;references)</pre>
</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/ServiceReferenceUtils.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/dependency/impl/ServiceReferenceManager.RankingResult.html" title="class in org.apache.felix.ipojo.dependency.impl"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../org/apache/felix/ipojo/dependency/impl/TransformedServiceReferenceImpl.html" title="class in org.apache.felix.ipojo.dependency.impl"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/felix/ipojo/dependency/impl/ServiceReferenceUtils.html" target="_top">Frames</a></li>
<li><a href="ServiceReferenceUtils.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><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&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>