BundleTracker
class simplifies tracking bundles much like the ServiceTracker
simplifies tracking services. A BundleTracker
is constructed with state criteria and a BundleTrackerCustomizer
object. A BundleTracker
can use the BundleTrackerCustomizer
to select which bundles are tracked and to create a customized object to be tracked with the bundle. The BundleTracker
can then be opened to begin tracking all bundles whose state matches the specified state criteria.
The getBundles
method can be called to get the Bundle
objects of the bundles being tracked. The getObject
method can be called to get the customized object for a tracked bundle.
The BundleTracker
class is thread-safe. It does not call a BundleTrackerCustomizer
while holding any locks. BundleTrackerCustomizer
implementations must also be thread-safe.
@ThreadSafe
@version $Revision: 5894 $
@since 1.4
|
|