Interface ServiceProviderCache.ProviderRegistry

  • Enclosing class:
    ServiceProviderCache
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface ServiceProviderCache.ProviderRegistry
    Registry used to add available service providers.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <S extends Service>
      void
      add​(java.lang.Class<S> serviceType, java.util.function.Supplier<? extends S> serviceSupplier)
      Registers the given service supplier for the given service type.
    • Method Detail

      • add

        <S extends Service> void add​(java.lang.Class<S> serviceType,
                                     java.util.function.Supplier<? extends S> serviceSupplier)
        Registers the given service supplier for the given service type.
        Parameters:
        serviceType - the service type
        serviceSupplier - the supplier for the implementation instance