@@ -22,29 +22,29 @@ private IntegrationsLoader() {
2222 }
2323
2424 /**
25- * Loads the best suited service, i.e. the one with the highest priority that is supported.
25+ * Loads the best suited service provider , i.e. the one with the highest priority that is supported.
2626 * <p>
2727 * If two services are available with the same priority, it is unspecified which one will be returned.
2828 *
2929 * @param clazz Service class
3030 * @param <T> Type of the service
31- * @return Highest priority service or empty if no supported service was found
31+ * @return Highest priority service provider or empty if no supported service provider was found
3232 */
3333 public static <T > Optional <T > load (Class <T > clazz ) {
3434 return loadAll (clazz ).findFirst ();
3535 }
3636
3737 /**
38- * Loads all suited services ordered by priority in descending order.
38+ * Loads all suited service providers ordered by priority in descending order.
3939 *
4040 * @param clazz Service class
4141 * @param <T> Type of the service
42- * @return An ordered stream of all suited service candidates
42+ * @return An ordered stream of all suited service providers
4343 */
4444 public static <T > Stream <T > loadAll (Class <T > clazz ) {
4545 return ServiceLoader .load (clazz , ClassLoaderFactory .forPluginDir ())
4646 .stream ()
47- .peek (service -> logFoundService (clazz , service .type ()))
47+ .peek (serviceProvider -> logFoundServiceProvider (clazz , serviceProvider .type ()))
4848 .filter (IntegrationsLoader ::isSupportedOperatingSystem )
4949 .filter (IntegrationsLoader ::passesStaticAvailabilityCheck )
5050 .sorted (Comparator .comparingInt (IntegrationsLoader ::getPriority ).reversed ())
@@ -53,7 +53,7 @@ public static <T> Stream<T> loadAll(Class<T> clazz) {
5353 .peek (impl -> logServiceIsAvailable (clazz , impl .getClass ()));
5454 }
5555
56- private static void logFoundService (Class <?> apiType , Class <?> implType ) {
56+ private static void logFoundServiceProvider (Class <?> apiType , Class <?> implType ) {
5757 if (LOG .isDebugEnabled ()) {
5858 LOG .debug ("{}: Found implementation: {} in jar {}" , apiType .getSimpleName (), implType .getName (), implType .getProtectionDomain ().getCodeSource ().getLocation ().getPath ());
5959 }
0 commit comments