Class BootstrapServiceRegistryBuilder

    • Constructor Detail

      • BootstrapServiceRegistryBuilder

        public BootstrapServiceRegistryBuilder()
    • Method Detail

      • applyTcclLookupPrecedence

        public void applyTcclLookupPrecedence​(TcclLookupPrecedence precedence)
        Defines when the lookup in the thread context ClassLoader is done.
        Parameters:
        precedence - The lookup precedence
      • applyStrategySelector

        public <T> BootstrapServiceRegistryBuilder applyStrategySelector​(Class<T> strategy,
                                                                         String name,
                                                                         Class<? extends T> implementation)
        Applies a named strategy implementation to the bootstrap registry.
        Type Parameters:
        T - Defines the strategy type and makes sure that the strategy and implementation are of compatible types.
        Parameters:
        strategy - The strategy
        name - The registered name
        implementation - The strategy implementation Class
        Returns:
        this, for method chaining
        See Also:
        StrategySelector.registerStrategyImplementor(Class, String, Class)
      • disableAutoClose

        public BootstrapServiceRegistryBuilder disableAutoClose()
        By default, when a ServiceRegistry is no longer referenced by any other registries as a parent it will be closed.

        Some applications that explicitly build "shared registries" may want to circumvent that behavior.

        This method indicates that the registry being built should not be automatically closed. The caller agrees to take responsibility to close it themselves.

        Returns:
        this, for method chaining
      • destroy

        public static void destroy​(ServiceRegistry serviceRegistry)
        Destroy a service registry. Clients should only destroy registries they have created.
        Parameters:
        serviceRegistry - The registry to be closed.