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.
-
-
Constructor Summary
Constructors Constructor Description SortingServiceTracker(org.osgi.framework.BundleContext context, java.lang.String clazz)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
addingService(org.osgi.framework.ServiceReference<T> reference)
java.util.List<org.osgi.framework.ServiceReference<T>>
getSortedServiceReferences()
Return a sorted list of the services references.java.util.List<T>
getSortedServices()
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)
-
-
-
Method Detail
-
removedService
public void removedService(org.osgi.framework.ServiceReference<T> reference, T service)
-
modifiedService
public void modifiedService(org.osgi.framework.ServiceReference<T> reference, T service)
-
getSortedServices
public java.util.List<T> getSortedServices()
Return a sorted list of the services.- Returns:
- Service list
-
getSortedServiceReferences
public java.util.List<org.osgi.framework.ServiceReference<T>> getSortedServiceReferences()
Return a sorted list of the services references.- Returns:
- Service list
-
-