blob: 7293df7ec72f49280e0b93568eded9277d941831 [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 May 26 23:22:38 CEST 2015 -->
<title>BundleTracker</title>
<meta name="date" content="2015-05-26">
<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="BundleTracker";
}
//-->
</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/tracker/AbstractCustomizerActionSet.html" title="class in org.apache.felix.dm.tracker"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html" title="interface in org.apache.felix.dm.tracker"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/felix/dm/tracker/BundleTracker.html" target="_top">Frames</a></li>
<li><a href="BundleTracker.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><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><a href="#field_detail">Field</a>&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.dm.tracker</div>
<h2 title="Class BundleTracker" class="title">Class BundleTracker</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.felix.dm.tracker.BundleTracker</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html" title="interface in org.apache.felix.dm.tracker">BundleTrackerCustomizer</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">BundleTracker</span>
extends java.lang.Object
implements <a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html" title="interface in org.apache.felix.dm.tracker">BundleTrackerCustomizer</a></pre>
<div class="block">The <code>BundleTracker</code> class simplifies tracking bundles much like
the <code>ServiceTracker</code> simplifies tracking services.
<p>
A <code>BundleTracker</code> is constructed with state criteria and a
<code>BundleTrackerCustomizer</code> object. A <code>BundleTracker</code> can
use the <code>BundleTrackerCustomizer</code> to select which bundles are
tracked and to create a customized object to be tracked with the bundle. The
<code>BundleTracker</code> can then be opened to begin tracking all bundles
whose state matches the specified state criteria.
<p>
The <code>getBundles</code> method can be called to get the
<code>Bundle</code> objects of the bundles being tracked. The
<code>getObject</code> method can be called to get the customized object for
a tracked bundle.
<p>
The <code>BundleTracker</code> class is thread-safe. It does not call a
<code>BundleTrackerCustomizer</code> while holding any locks.
<code>BundleTrackerCustomizer</code> implementations must also be
thread-safe.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.4</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>protected BundleContext</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/tracker/BundleTracker.html#context">context</a></strong></code>
<div class="block">The Bundle Context used by this <code>BundleTracker</code>.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== 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/dm/tracker/BundleTracker.html#BundleTracker(BundleContext,%20int,%20org.apache.felix.dm.tracker.BundleTrackerCustomizer)">BundleTracker</a></strong>(BundleContext&nbsp;context,
int&nbsp;stateMask,
<a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html" title="interface in org.apache.felix.dm.tracker">BundleTrackerCustomizer</a>&nbsp;customizer)</code>
<div class="block">Create a <code>BundleTracker</code> for bundles whose state is present in
the specified state mask.</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/dm/tracker/BundleTracker.html#addedBundle(Bundle,%20BundleEvent,%20java.lang.Object)">addedBundle</a></strong>(Bundle&nbsp;bundle,
BundleEvent&nbsp;event,
java.lang.Object&nbsp;object)</code>
<div class="block">marrs: A bundle has been added to the BundleTracker.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/tracker/BundleTracker.html#addingBundle(Bundle,%20BundleEvent)">addingBundle</a></strong>(Bundle&nbsp;bundle,
BundleEvent&nbsp;event)</code>
<div class="block">Default implementation of the
<code>BundleTrackerCustomizer.addingBundle</code> method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/tracker/BundleTracker.html#close()">close</a></strong>()</code>
<div class="block">Close this <code>BundleTracker</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>Bundle[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/tracker/BundleTracker.html#getBundles()">getBundles</a></strong>()</code>
<div class="block">Return an array of <code>Bundle</code>s for all bundles being tracked by
this <code>BundleTracker</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/tracker/BundleTracker.html#getObject(Bundle)">getObject</a></strong>(Bundle&nbsp;bundle)</code>
<div class="block">Returns the customized object for the specified <code>Bundle</code> if
the specified bundle is being tracked by this <code>BundleTracker</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/tracker/BundleTracker.html#getTrackingCount()">getTrackingCount</a></strong>()</code>
<div class="block">Returns the tracking count for this <code>BundleTracker</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/tracker/BundleTracker.html#modifiedBundle(Bundle,%20BundleEvent,%20java.lang.Object)">modifiedBundle</a></strong>(Bundle&nbsp;bundle,
BundleEvent&nbsp;event,
java.lang.Object&nbsp;object)</code>
<div class="block">Default implementation of the
<code>BundleTrackerCustomizer.modifiedBundle</code> method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/tracker/BundleTracker.html#open()">open</a></strong>()</code>
<div class="block">Open this <code>BundleTracker</code> and begin tracking bundles.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/tracker/BundleTracker.html#remove(Bundle)">remove</a></strong>(Bundle&nbsp;bundle)</code>
<div class="block">Remove a bundle from this <code>BundleTracker</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/tracker/BundleTracker.html#removedBundle(Bundle,%20BundleEvent,%20java.lang.Object)">removedBundle</a></strong>(Bundle&nbsp;bundle,
BundleEvent&nbsp;event,
java.lang.Object&nbsp;object)</code>
<div class="block">Default implementation of the
<code>BundleTrackerCustomizer.removedBundle</code> method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/dm/tracker/BundleTracker.html#size()">size</a></strong>()</code>
<div class="block">Return the number of bundles being tracked by this
<code>BundleTracker</code>.</div>
</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.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</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="context">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>context</h4>
<pre>protected final&nbsp;BundleContext context</pre>
<div class="block">The Bundle Context used by this <code>BundleTracker</code>.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="BundleTracker(BundleContext, int, org.apache.felix.dm.tracker.BundleTrackerCustomizer)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BundleTracker</h4>
<pre>public&nbsp;BundleTracker(BundleContext&nbsp;context,
int&nbsp;stateMask,
<a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html" title="interface in org.apache.felix.dm.tracker">BundleTrackerCustomizer</a>&nbsp;customizer)</pre>
<div class="block">Create a <code>BundleTracker</code> for bundles whose state is present in
the specified state mask.
<p>
Bundles whose state is present on the specified state mask will be
tracked by this <code>BundleTracker</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>context</code> - The <code>BundleContext</code> against which the tracking
is done.</dd><dd><code>stateMask</code> - The bit mask of the <code>OR</code>ing of the bundle
states to be tracked.</dd><dd><code>customizer</code> - The customizer object to call when bundles are added,
modified, or removed in this <code>BundleTracker</code>. If
customizer is <code>null</code>, then this
<code>BundleTracker</code> will be used as the
<code>BundleTrackerCustomizer</code> and this
<code>BundleTracker</code> will call the
<code>BundleTrackerCustomizer</code> methods on itself.</dd><dt><span class="strong">See Also:</span></dt><dd><code>Bundle#getState()</code></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="open()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>open</h4>
<pre>public&nbsp;void&nbsp;open()</pre>
<div class="block">Open this <code>BundleTracker</code> and begin tracking bundles.
<p>
Bundle which match the state criteria specified when this
<code>BundleTracker</code> was created are now tracked by this
<code>BundleTracker</code>.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - If the <code>BundleContext</code>
with which this <code>BundleTracker</code> was created is no
longer valid.</dd>
<dd><code>java.lang.SecurityException</code> - If the caller and this class do not
have the appropriate
<code>AdminPermission[context bundle,LISTENER]</code>, and the
Java Runtime Environment supports permissions.</dd></dl>
</li>
</ul>
<a name="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()</pre>
<div class="block">Close this <code>BundleTracker</code>.
<p>
This method should be called when this <code>BundleTracker</code> should
end the tracking of bundles.
<p>
This implementation calls <a href="../../../../../org/apache/felix/dm/tracker/BundleTracker.html#getBundles()"><code>getBundles()</code></a> to get the list of
tracked bundles to remove.</div>
</li>
</ul>
<a name="addingBundle(Bundle, BundleEvent)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addingBundle</h4>
<pre>public&nbsp;java.lang.Object&nbsp;addingBundle(Bundle&nbsp;bundle,
BundleEvent&nbsp;event)</pre>
<div class="block">Default implementation of the
<code>BundleTrackerCustomizer.addingBundle</code> method.
<p>
This method is only called when this <code>BundleTracker</code> has been
constructed with a <code>null BundleTrackerCustomizer</code> argument.
<p>
This implementation simply returns the specified <code>Bundle</code>.
<p>
This method can be overridden in a subclass to customize the object to be
tracked for the bundle being added.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html#addingBundle(Bundle,%20BundleEvent)">addingBundle</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html" title="interface in org.apache.felix.dm.tracker">BundleTrackerCustomizer</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>bundle</code> - The <code>Bundle</code> being added to this
<code>BundleTracker</code> object.</dd><dd><code>event</code> - The bundle event which caused this customizer method to be
called or <code>null</code> if there is no bundle event associated
with the call to this method.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The specified bundle.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html#addingBundle(Bundle,%20BundleEvent)"><code>BundleTrackerCustomizer.addingBundle(Bundle, BundleEvent)</code></a></dd></dl>
</li>
</ul>
<a name="addedBundle(Bundle, BundleEvent, java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addedBundle</h4>
<pre>public&nbsp;void&nbsp;addedBundle(Bundle&nbsp;bundle,
BundleEvent&nbsp;event,
java.lang.Object&nbsp;object)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html#addedBundle(Bundle,%20BundleEvent,%20java.lang.Object)">BundleTrackerCustomizer</a></code></strong></div>
<div class="block">marrs: A bundle has been added to the BundleTracker.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html#addedBundle(Bundle,%20BundleEvent,%20java.lang.Object)">addedBundle</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html" title="interface in org.apache.felix.dm.tracker">BundleTrackerCustomizer</a></code></dd>
</dl>
</li>
</ul>
<a name="modifiedBundle(Bundle, BundleEvent, java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>modifiedBundle</h4>
<pre>public&nbsp;void&nbsp;modifiedBundle(Bundle&nbsp;bundle,
BundleEvent&nbsp;event,
java.lang.Object&nbsp;object)</pre>
<div class="block">Default implementation of the
<code>BundleTrackerCustomizer.modifiedBundle</code> method.
<p>
This method is only called when this <code>BundleTracker</code> has been
constructed with a <code>null BundleTrackerCustomizer</code> argument.
<p>
This implementation does nothing.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html#modifiedBundle(Bundle,%20BundleEvent,%20java.lang.Object)">modifiedBundle</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html" title="interface in org.apache.felix.dm.tracker">BundleTrackerCustomizer</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>bundle</code> - The <code>Bundle</code> whose state has been modified.</dd><dd><code>event</code> - The bundle event which caused this customizer method to be
called or <code>null</code> if there is no bundle event associated
with the call to this method.</dd><dd><code>object</code> - The customized object for the specified Bundle.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html#modifiedBundle(Bundle,%20BundleEvent,%20java.lang.Object)"><code>BundleTrackerCustomizer.modifiedBundle(Bundle, BundleEvent, Object)</code></a></dd></dl>
</li>
</ul>
<a name="removedBundle(Bundle, BundleEvent, java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removedBundle</h4>
<pre>public&nbsp;void&nbsp;removedBundle(Bundle&nbsp;bundle,
BundleEvent&nbsp;event,
java.lang.Object&nbsp;object)</pre>
<div class="block">Default implementation of the
<code>BundleTrackerCustomizer.removedBundle</code> method.
<p>
This method is only called when this <code>BundleTracker</code> has been
constructed with a <code>null BundleTrackerCustomizer</code> argument.
<p>
This implementation does nothing.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html#removedBundle(Bundle,%20BundleEvent,%20java.lang.Object)">removedBundle</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html" title="interface in org.apache.felix.dm.tracker">BundleTrackerCustomizer</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>bundle</code> - The <code>Bundle</code> being removed.</dd><dd><code>event</code> - The bundle event which caused this customizer method to be
called or <code>null</code> if there is no bundle event associated
with the call to this method.</dd><dd><code>object</code> - The customized object for the specified bundle.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html#removedBundle(Bundle,%20BundleEvent,%20java.lang.Object)"><code>BundleTrackerCustomizer.removedBundle(Bundle, BundleEvent, Object)</code></a></dd></dl>
</li>
</ul>
<a name="getBundles()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBundles</h4>
<pre>public&nbsp;Bundle[]&nbsp;getBundles()</pre>
<div class="block">Return an array of <code>Bundle</code>s for all bundles being tracked by
this <code>BundleTracker</code>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>An array of <code>Bundle</code>s or <code>null</code> if no
bundles are being tracked.</dd></dl>
</li>
</ul>
<a name="getObject(Bundle)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getObject</h4>
<pre>public&nbsp;java.lang.Object&nbsp;getObject(Bundle&nbsp;bundle)</pre>
<div class="block">Returns the customized object for the specified <code>Bundle</code> if
the specified bundle is being tracked by this <code>BundleTracker</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bundle</code> - The <code>Bundle</code> being tracked.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The customized object for the specified <code>Bundle</code> or
<code>null</code> if the specified <code>Bundle</code> is not
being tracked.</dd></dl>
</li>
</ul>
<a name="remove(Bundle)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre>public&nbsp;void&nbsp;remove(Bundle&nbsp;bundle)</pre>
<div class="block">Remove a bundle from this <code>BundleTracker</code>.
The specified bundle will be removed from this <code>BundleTracker</code>
. If the specified bundle was being tracked then the
<code>BundleTrackerCustomizer.removedBundle</code> method will be called
for that bundle.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bundle</code> - The <code>Bundle</code> to be removed.</dd></dl>
</li>
</ul>
<a name="size()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public&nbsp;int&nbsp;size()</pre>
<div class="block">Return the number of bundles being tracked by this
<code>BundleTracker</code>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The number of bundles being tracked.</dd></dl>
</li>
</ul>
<a name="getTrackingCount()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getTrackingCount</h4>
<pre>public&nbsp;int&nbsp;getTrackingCount()</pre>
<div class="block">Returns the tracking count for this <code>BundleTracker</code>.
The tracking count is initialized to 0 when this
<code>BundleTracker</code> is opened. Every time a bundle is added,
modified or removed from this <code>BundleTracker</code> the tracking
count is incremented.
<p>
The tracking count can be used to determine if this
<code>BundleTracker</code> has added, modified or removed a bundle by
comparing a tracking count value previously collected with the current
tracking count value. If the value has not changed, then no bundle has
been added, modified or removed from this <code>BundleTracker</code>
since the previous tracking count was collected.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The tracking count for this <code>BundleTracker</code> or -1 if
this <code>BundleTracker</code> is not open.</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/tracker/AbstractCustomizerActionSet.html" title="class in org.apache.felix.dm.tracker"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/felix/dm/tracker/BundleTrackerCustomizer.html" title="interface in org.apache.felix.dm.tracker"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/felix/dm/tracker/BundleTracker.html" target="_top">Frames</a></li>
<li><a href="BundleTracker.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><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><a href="#field_detail">Field</a>&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 ======= -->
</body>
</html>