Package org.apache.aries.util.tracker
Class InternalRecursiveBundleTracker
- java.lang.Object
-
- org.osgi.util.tracker.BundleTracker
-
- org.apache.aries.util.tracker.InternalRecursiveBundleTracker
-
- All Implemented Interfaces:
BundleTrackerCustomizer
public class InternalRecursiveBundleTracker extends BundleTracker
A BundleTracker which will track bundles in the given context, and also bundles in any child contexts. This should be used instead of the normal non-recursive BundleTracker when registering bundle tracker customizers.
-
-
Constructor Summary
Constructors Constructor Description InternalRecursiveBundleTracker(BundleContext context, int stateMask, BundleTrackerCustomizer customizer, boolean nested)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
addingBundle(Bundle b, BundleEvent event)
Default implementation of theBundleTrackerCustomizer.addingBundle
method.void
modifiedBundle(Bundle b, BundleEvent event, Object object)
Default implementation of theBundleTrackerCustomizer.modifiedBundle
method.void
removedBundle(Bundle b, BundleEvent event, Object object)
Default implementation of theBundleTrackerCustomizer.removedBundle
method.-
Methods inherited from class org.osgi.util.tracker.BundleTracker
close, getBundles, getObject, getTracked, getTrackingCount, isEmpty, open, remove, size
-
-
-
-
Constructor Detail
-
InternalRecursiveBundleTracker
public InternalRecursiveBundleTracker(BundleContext context, int stateMask, BundleTrackerCustomizer customizer, boolean nested)
-
-
Method Detail
-
addingBundle
public Object addingBundle(Bundle b, BundleEvent event)
Description copied from class:BundleTracker
Default implementation of theBundleTrackerCustomizer.addingBundle
method.This method is only called when this
BundleTracker
has been constructed with anull BundleTrackerCustomizer
argument.This implementation simply returns the specified
Bundle
.This method can be overridden in a subclass to customize the object to be tracked for the bundle being added.
- Specified by:
addingBundle
in interfaceBundleTrackerCustomizer
- Overrides:
addingBundle
in classBundleTracker
- Parameters:
b
- TheBundle
being added to thisBundleTracker
object.event
- The bundle event which caused this customizer method to be called ornull
if there is no bundle event associated with the call to this method.- Returns:
- The specified bundle.
- See Also:
BundleTrackerCustomizer.addingBundle(Bundle, BundleEvent)
-
modifiedBundle
public void modifiedBundle(Bundle b, BundleEvent event, Object object)
Description copied from class:BundleTracker
Default implementation of theBundleTrackerCustomizer.modifiedBundle
method.This method is only called when this
BundleTracker
has been constructed with anull BundleTrackerCustomizer
argument.This implementation does nothing.
- Specified by:
modifiedBundle
in interfaceBundleTrackerCustomizer
- Overrides:
modifiedBundle
in classBundleTracker
- Parameters:
b
- TheBundle
whose state has been modified.event
- The bundle event which caused this customizer method to be called ornull
if there is no bundle event associated with the call to this method.object
- The customized object for the specified Bundle.- See Also:
BundleTrackerCustomizer.modifiedBundle(Bundle, BundleEvent, Object)
-
removedBundle
public void removedBundle(Bundle b, BundleEvent event, Object object)
Description copied from class:BundleTracker
Default implementation of theBundleTrackerCustomizer.removedBundle
method.This method is only called when this
BundleTracker
has been constructed with anull BundleTrackerCustomizer
argument.This implementation does nothing.
- Specified by:
removedBundle
in interfaceBundleTrackerCustomizer
- Overrides:
removedBundle
in classBundleTracker
- Parameters:
b
- TheBundle
being removed.event
- The bundle event which caused this customizer method to be called ornull
if there is no bundle event associated with the call to this method.object
- The customized object for the specified bundle.- See Also:
BundleTrackerCustomizer.removedBundle(Bundle, BundleEvent, Object)
-
-