Interface ServiceRegistryScope


  • public interface ServiceRegistryScope
    • Method Detail

      • using

        static void using​(java.util.function.Supplier<StandardServiceRegistry> ssrProducer,
                          java.util.function.Consumer<ServiceRegistryScope> action)
        Generalized support for running exception-safe code using a ServiceRegistry to ensure proper shutdown
      • withService

        default <S extends Service> void withService​(java.lang.Class<S> role,
                                                     java.util.function.Consumer<S> action)
      • fromService

        default <R,​S extends Service> R fromService​(java.lang.Class<S> role,
                                                          java.util.function.Function<S,​R> action)