BootstrapServiceRegistry instances.
An instance of this class may be obtained simply by
instantiation. Then a new
BootstrapServiceRegistry may be obtained by calling build().
It should be later destroyed by calling destroy(ServiceRegistry).
Alternatively, auto-close may be enabled.
Provides a registry of services needed for most operations.
Manages a ClassLoaderService, a set of Integrators, and a
StrategySelectorBuilder responsible for creation and management
of org.s.
StandardServiceRegistryBuilder
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private List | |
| private ClassLoaderService | |
| private final LinkedHashSet | |
| private final StrategySelectorBuilder | |
| private TcclLookupPrecedence |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public BootstrapServiceRegistryBuilder | Returns: this, for method chainingThe class loader to use classLoader)Adds a provided |
| public BootstrapServiceRegistryBuilder | Returns: this, for method chainingThe class loader service to use classLoaderService)Adds a provided |
| public BootstrapServiceRegistryBuilder | Returns: this, for method chainingThe integrator to add. integrator)Add an |
| public < Defines the strategy type and makes sure that the strategy and implementation
are of compatible types. T> BootstrapServiceRegistryBuilder | Returns: this, for method chainingThe strategy strategy, String The registered name name, Class<? extends T> The strategy implementation Class implementation)Applies a named strategy implementation to the bootstrap registry. |
| public BootstrapServiceRegistryBuilder | Returns: this, for method chainingA provider for one or more available selectors strategyRegistrationProvider)Applies one or more strategy selectors announced as available by the passed announcer. |
| public void | applyTcclLookupPrecedence(TcclLookupPrecedence
The lookup precedence precedence)Defines when the lookup in the thread context |
| public BootstrapServiceRegistry | |
| public static void | |
| public BootstrapServiceRegistryBuilder | Returns: this, for method chainingBy default, when a |
| public BootstrapServiceRegistryBuilder |
| autoCloseRegistry | back to summary |
|---|---|
| private boolean autoCloseRegistry | |
| providedClassLoaders | back to summary |
|---|---|
| private List<ClassLoader> providedClassLoaders | |
| providedClassLoaderService | back to summary |
|---|---|
| private ClassLoaderService providedClassLoaderService | |
| providedIntegrators | back to summary |
|---|---|
| private final LinkedHashSet<Integrator> providedIntegrators | |
| strategySelectorBuilder | back to summary |
|---|---|
| private final StrategySelectorBuilder strategySelectorBuilder | |
| tcclLookupPrecedence | back to summary |
|---|---|
| private TcclLookupPrecedence tcclLookupPrecedence | |
| BootstrapServiceRegistryBuilder | back to summary |
|---|---|
| public BootstrapServiceRegistryBuilder() | |
| applyClassLoader | back to summary |
|---|---|
| public BootstrapServiceRegistryBuilder applyClassLoader(ClassLoader classLoader) Adds a provided
| |
| applyClassLoaderService | back to summary |
|---|---|
| public BootstrapServiceRegistryBuilder applyClassLoaderService(ClassLoaderService classLoaderService) Adds a provided
| |
| applyIntegrator | back to summary |
|---|---|
| public BootstrapServiceRegistryBuilder applyIntegrator(Integrator integrator) Add an
| |
| applyStrategySelector | back to summary |
|---|---|
| public <T> BootstrapServiceRegistryBuilder applyStrategySelector(Class<T> strategy, String name, Class<? extends T> implementation) Applies a named strategy implementation to the bootstrap registry.
| |
| applyStrategySelectors | back to summary |
|---|---|
| public BootstrapServiceRegistryBuilder applyStrategySelectors(StrategyRegistrationProvider strategyRegistrationProvider) Applies one or more strategy selectors announced as available by the passed announcer.
| |
| applyTcclLookupPrecedence | back to summary |
|---|---|
| public void applyTcclLookupPrecedence(TcclLookupPrecedence precedence) Defines when the lookup in the thread context
| |
| build | back to summary |
|---|---|
| public BootstrapServiceRegistry build() Build the bootstrap registry.
| |
| destroy | back to summary |
|---|---|
| public static void destroy(ServiceRegistry serviceRegistry) Destroy a service registry. Clients should only destroy registries they have created.
| |
| disableAutoClose | back to summary |
|---|---|
| public BootstrapServiceRegistryBuilder disableAutoClose() By default, when a 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.
| |
| enableAutoClose | back to summary |
|---|---|
| public BootstrapServiceRegistryBuilder enableAutoClose() See the discussion on
| |