Package org.apache.sling.commons.osgi
Class SortingServiceTracker<T>
java.lang.Object
org.osgi.util.tracker.ServiceTracker<T,T>
org.apache.sling.commons.osgi.SortingServiceTracker<T>
- All Implemented Interfaces:
org.osgi.util.tracker.ServiceTrackerCustomizer<T,
T>
public class SortingServiceTracker<T>
extends org.osgi.util.tracker.ServiceTracker<T,T>
Implementation providing a sorted list of services
by service ranking.
-
Field Summary
Fields inherited from class org.osgi.util.tracker.ServiceTracker
context, filter
-
Constructor Summary
ConstructorDescriptionSortingServiceTracker
(org.osgi.framework.BundleContext context, String clazz) Constructor -
Method Summary
Modifier and TypeMethodDescriptionaddingService
(org.osgi.framework.ServiceReference<T> reference) Return a sorted list of the services references.Return a sorted list of the services.void
modifiedService
(org.osgi.framework.ServiceReference<T> reference, T service) void
removedService
(org.osgi.framework.ServiceReference<T> reference, T service) Methods inherited from class org.osgi.util.tracker.ServiceTracker
close, getService, getService, getServiceReference, getServiceReferences, getServices, getServices, getTracked, getTrackingCount, isEmpty, open, open, remove, size, waitForService
-
Constructor Details
-
SortingServiceTracker
Constructor- Parameters:
context
- Bundle contextclazz
- Class
-
-
Method Details
-
removedService
-
modifiedService
-
addingService
-
getSortedServices
Return a sorted list of the services.- Returns:
- Service list
-
getSortedServiceReferences
Return a sorted list of the services references.- Returns:
- Service list
-