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
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
ConstructorsConstructorDescriptionInternalRecursiveBundleTracker(BundleContext context, int stateMask, BundleTrackerCustomizer customizer, boolean nested) -
Method Summary
Modifier and TypeMethodDescriptionaddingBundle(Bundle b, BundleEvent event) Default implementation of theBundleTrackerCustomizer.addingBundlemethod.voidmodifiedBundle(Bundle b, BundleEvent event, Object object) Default implementation of theBundleTrackerCustomizer.modifiedBundlemethod.voidremovedBundle(Bundle b, BundleEvent event, Object object) Default implementation of theBundleTrackerCustomizer.removedBundlemethod.Methods inherited from class org.osgi.util.tracker.BundleTracker
close, getBundles, getObject, getTracked, getTrackingCount, isEmpty, open, remove, size
-
Constructor Details
-
InternalRecursiveBundleTracker
public InternalRecursiveBundleTracker(BundleContext context, int stateMask, BundleTrackerCustomizer customizer, boolean nested)
-
-
Method Details
-
addingBundle
Description copied from class:BundleTrackerDefault implementation of theBundleTrackerCustomizer.addingBundlemethod.This method is only called when this
BundleTrackerhas been constructed with anull BundleTrackerCustomizerargument.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:
addingBundlein interfaceBundleTrackerCustomizer- Overrides:
addingBundlein classBundleTracker- Parameters:
b- TheBundlebeing added to thisBundleTrackerobject.event- The bundle event which caused this customizer method to be called ornullif there is no bundle event associated with the call to this method.- Returns:
- The specified bundle.
- See Also:
-
modifiedBundle
Description copied from class:BundleTrackerDefault implementation of theBundleTrackerCustomizer.modifiedBundlemethod.This method is only called when this
BundleTrackerhas been constructed with anull BundleTrackerCustomizerargument.This implementation does nothing.
- Specified by:
modifiedBundlein interfaceBundleTrackerCustomizer- Overrides:
modifiedBundlein classBundleTracker- Parameters:
b- TheBundlewhose state has been modified.event- The bundle event which caused this customizer method to be called ornullif there is no bundle event associated with the call to this method.object- The customized object for the specified Bundle.- See Also:
-
removedBundle
Description copied from class:BundleTrackerDefault implementation of theBundleTrackerCustomizer.removedBundlemethod.This method is only called when this
BundleTrackerhas been constructed with anull BundleTrackerCustomizerargument.This implementation does nothing.
- Specified by:
removedBundlein interfaceBundleTrackerCustomizer- Overrides:
removedBundlein classBundleTracker- Parameters:
b- TheBundlebeing removed.event- The bundle event which caused this customizer method to be called ornullif there is no bundle event associated with the call to this method.object- The customized object for the specified bundle.- See Also:
-