org.apache.sling.installer.core.impl
Class SortingServiceTracker<T>

java.lang.Object
  extended by org.osgi.util.tracker.ServiceTracker
      extended by org.apache.sling.installer.core.impl.SortingServiceTracker<T>
All Implemented Interfaces:
org.osgi.util.tracker.ServiceTrackerCustomizer

public class SortingServiceTracker<T>
extends org.osgi.util.tracker.ServiceTracker

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
SortingServiceTracker(org.osgi.framework.BundleContext context, String clazz, OsgiInstallerImpl listener)
          Constructor
 
Method Summary
 Object addingService(org.osgi.framework.ServiceReference reference)
           
 List<org.osgi.framework.ServiceReference> getSortedServiceReferences()
          Return a sorted list of the services references.
 List<T> getSortedServices()
          Return a sorted list of the services.
 void modifiedService(org.osgi.framework.ServiceReference reference, Object service)
           
 void removedService(org.osgi.framework.ServiceReference reference, Object service)
           
 
Methods inherited from class org.osgi.util.tracker.ServiceTracker
close, getService, getService, getServiceReference, getServiceReferences, getServices, getTrackingCount, open, open, remove, size, waitForService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortingServiceTracker

public SortingServiceTracker(org.osgi.framework.BundleContext context,
                             String clazz,
                             OsgiInstallerImpl listener)
Constructor

Method Detail

removedService

public void removedService(org.osgi.framework.ServiceReference reference,
                           Object service)
Specified by:
removedService in interface org.osgi.util.tracker.ServiceTrackerCustomizer
Overrides:
removedService in class org.osgi.util.tracker.ServiceTracker
See Also:
ServiceTracker.removedService(org.osgi.framework.ServiceReference, java.lang.Object)

modifiedService

public void modifiedService(org.osgi.framework.ServiceReference reference,
                            Object service)
Specified by:
modifiedService in interface org.osgi.util.tracker.ServiceTrackerCustomizer
Overrides:
modifiedService in class org.osgi.util.tracker.ServiceTracker
See Also:
ServiceTrackerCustomizer.modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)

addingService

public Object addingService(org.osgi.framework.ServiceReference reference)
Specified by:
addingService in interface org.osgi.util.tracker.ServiceTrackerCustomizer
Overrides:
addingService in class org.osgi.util.tracker.ServiceTracker
See Also:
ServiceTrackerCustomizer.addingService(org.osgi.framework.ServiceReference)

getSortedServices

public List<T> getSortedServices()
Return a sorted list of the services.


getSortedServiceReferences

public List<org.osgi.framework.ServiceReference> getSortedServiceReferences()
Return a sorted list of the services references.



Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.