public class BootstrapServiceRegistryImpl extends Object implements ServiceRegistryImplementor, BootstrapServiceRegistry, ServiceBinding.ServiceLifecycleOwner
ServiceRegistry implementation containing specialized "bootstrap" services, specifically:
IMPL NOTE : Currently implements the deprecated BootstrapServiceRegistry contract
so that the registry returned from the builder works on the deprecated sense. Once
BootstrapServiceRegistry goes away, this should be updated to instead implement
BootstrapServiceRegistry.| Constructor and Description |
|---|
BootstrapServiceRegistryImpl()
Constructs a BootstrapServiceRegistryImpl.
|
BootstrapServiceRegistryImpl(boolean autoCloseRegistry,
ClassLoaderService classLoaderService,
LinkedHashSet<Integrator> providedIntegrators)
Constructs a BootstrapServiceRegistryImpl.
|
BootstrapServiceRegistryImpl(boolean autoCloseRegistry,
ClassLoaderService classLoaderService,
StrategySelector strategySelector,
IntegratorService integratorService)
Constructs a BootstrapServiceRegistryImpl.
|
BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService,
LinkedHashSet<Integrator> providedIntegrators)
Constructs a BootstrapServiceRegistryImpl.
|
BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService,
StrategySelector strategySelector,
IntegratorService integratorService)
Constructs a BootstrapServiceRegistryImpl.
|
| Modifier and Type | Method and Description |
|---|---|
<R extends Service> |
configureService(ServiceBinding<R> binding) |
void |
deRegisterChild(ServiceRegistryImplementor child)
When a registry is created with a parent, the parent is notified of the child
via this callback.
|
void |
destroy()
Release resources
|
ServiceRegistry |
getParentServiceRegistry()
Retrieve this registry's parent registry.
|
<R extends Service> |
getService(Class<R> serviceRole)
Retrieve a service by role.
|
<R extends Service> |
initiateService(ServiceInitiator<R> serviceInitiator) |
<R extends Service> |
injectDependencies(ServiceBinding<R> binding) |
boolean |
isActive() |
<R extends Service> |
locateServiceBinding(Class<R> serviceRole)
Locate the binding for the given role.
|
void |
registerChild(ServiceRegistryImplementor child)
When a registry is created with a parent, the parent is notified of the child
via this callback.
|
<R extends Service> |
startService(ServiceBinding<R> binding) |
<R extends Service> |
stopService(ServiceBinding<R> binding) |
public BootstrapServiceRegistryImpl()
BootstrapServiceRegistryBuilder
instead.BootstrapServiceRegistryBuilderpublic BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService, LinkedHashSet<Integrator> providedIntegrators)
BootstrapServiceRegistryBuilder
instead.classLoaderService - The ClassLoaderService to useprovidedIntegrators - The group of explicitly provided integratorsBootstrapServiceRegistryBuilderpublic BootstrapServiceRegistryImpl(boolean autoCloseRegistry,
ClassLoaderService classLoaderService,
LinkedHashSet<Integrator> providedIntegrators)
BootstrapServiceRegistryBuilder
instead.autoCloseRegistry - See discussion on
BootstrapServiceRegistryBuilder.disableAutoClose()classLoaderService - The ClassLoaderService to useprovidedIntegrators - The group of explicitly provided integratorsBootstrapServiceRegistryBuilderpublic BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService, StrategySelector strategySelector, IntegratorService integratorService)
BootstrapServiceRegistryBuilder
instead.classLoaderService - The ClassLoaderService to usestrategySelector - The StrategySelector to useintegratorService - The IntegratorService to useBootstrapServiceRegistryBuilderpublic BootstrapServiceRegistryImpl(boolean autoCloseRegistry,
ClassLoaderService classLoaderService,
StrategySelector strategySelector,
IntegratorService integratorService)
BootstrapServiceRegistryBuilder
instead.autoCloseRegistry - See discussion on
BootstrapServiceRegistryBuilder.disableAutoClose()classLoaderService - The ClassLoaderService to usestrategySelector - The StrategySelector to useintegratorService - The IntegratorService to useBootstrapServiceRegistryBuilderpublic <R extends Service> R getService(Class<R> serviceRole)
ServiceRegistryServiceInitiator is
registered for this service role, the service will be initialized and returned.
NOTE: We cannot return <R extends Service<T>> here because the service might come from the parent...getService in interface ServiceRegistryR - The service role typeserviceRole - The service rolepublic <R extends Service> ServiceBinding<R> locateServiceBinding(Class<R> serviceRole)
ServiceRegistryImplementorlocateServiceBinding in interface ServiceRegistryImplementorR - generic return type.serviceRole - The service role for which to locate a binding.nullpublic void destroy()
ServiceRegistryImplementordestroy in interface ServiceRegistryImplementorpublic boolean isActive()
public ServiceRegistry getParentServiceRegistry()
ServiceRegistrygetParentServiceRegistry in interface ServiceRegistrypublic <R extends Service> R initiateService(ServiceInitiator<R> serviceInitiator)
initiateService in interface ServiceBinding.ServiceLifecycleOwnerpublic <R extends Service> void configureService(ServiceBinding<R> binding)
configureService in interface ServiceBinding.ServiceLifecycleOwnerpublic <R extends Service> void injectDependencies(ServiceBinding<R> binding)
injectDependencies in interface ServiceBinding.ServiceLifecycleOwnerpublic <R extends Service> void startService(ServiceBinding<R> binding)
startService in interface ServiceBinding.ServiceLifecycleOwnerpublic <R extends Service> void stopService(ServiceBinding<R> binding)
stopService in interface ServiceBinding.ServiceLifecycleOwnerpublic void registerChild(ServiceRegistryImplementor child)
ServiceRegistryImplementorregisterChild in interface ServiceRegistryImplementorpublic void deRegisterChild(ServiceRegistryImplementor child)
ServiceRegistryImplementordeRegisterChild in interface ServiceRegistryImplementorCopyright © 2001-2015 Red Hat, Inc. All Rights Reserved.