Class ServiceProvider


  • @ParametersAreNonnullByDefault
    public final class ServiceProvider
    extends Object
    An object able to retrieve and load services according to a ServiceContext.
    • Method Detail

      • getInstance

        @Nonnull
        public static ServiceProvider getInstance()
        Returns the instance of this class.
        Returns:
        the instance of this class
      • load

        @Nonnull
        public <S> Stream<ServiceDefinition<S>> load​(Class<S> type)
        Retrieves all registered services of the specified type.
        Returns:
        a parallel stream of all registered services of the specified type