Class FirstElementServiceSelectionStrategy<T>

java.lang.Object
ddf.catalog.util.impl.FirstElementServiceSelectionStrategy<T>
Type Parameters:
T - - The type of the service to be returned. ServiceSelectionStrategy
All Implemented Interfaces:
ServiceSelectionStrategy<T>

public class FirstElementServiceSelectionStrategy<T> extends Object implements ServiceSelectionStrategy<T>
This is a basic implementation of ServiceSelectionStrategy which returns the first element from the supplied java.util.SortedSet.
  • Constructor Details

    • FirstElementServiceSelectionStrategy

      public FirstElementServiceSelectionStrategy()
  • Method Details

    • selectService

      public org.osgi.framework.ServiceReference<T> selectService(SortedSet<org.osgi.framework.ServiceReference<T>> serviceSet)
      Specified by:
      selectService in interface ServiceSelectionStrategy<T>
      Parameters:
      serviceSet - - An unmodifiable, sorted list of all services bound to the ServiceSelector instance.
      Returns:
      the first element of serviceSet.