Interface IServiceSelector<T>
-
- All Known Implementing Classes:
AbstractComparableServiceSelector,ExtensionImplementationSelector,VersionedServiceSelector
public interface IServiceSelector<T>Created by Elec332 on 19-4-2020 Used for selecting the service with the best implementation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description TgetBestService(java.util.Collection<T> implementations)Determines the best implementation ofg a service and returns itjava.lang.Class<T>getType()default TloadService(java.util.ServiceLoader.Provider<T> provider)Load the provided service.
-
-
-
Method Detail
-
getType
java.lang.Class<T> getType()
- Returns:
- The type this selector can process
-
loadService
default T loadService(java.util.ServiceLoader.Provider<T> provider)
Load the provided service. If the service can't be loaded for any reason, this method should return null- Parameters:
provider- The provider to be loaded- Returns:
- The loaded service
-
-