public class BootstrapServiceRegistryImpl extends Object implements ServiceRegistryImplementor, BootstrapServiceRegistry, ServiceBinding.ServiceLifecycleOwner
ServiceRegistry
implementation containing specialized "bootstrap" services, specifically:Constructor and Description |
---|
BootstrapServiceRegistryImpl() |
BootstrapServiceRegistryImpl(boolean autoCloseRegistry,
ClassLoaderService classLoaderService,
IntegratorService integratorService) |
BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService,
IntegratorService integratorService) |
BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService,
LinkedHashSet<Integrator> providedIntegrators) |
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()
public BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService, IntegratorService integratorService)
public BootstrapServiceRegistryImpl(boolean autoCloseRegistry, ClassLoaderService classLoaderService, IntegratorService integratorService)
public BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService, LinkedHashSet<Integrator> providedIntegrators)
public <R extends Service> R getService(Class<R> serviceRole)
ServiceRegistry
BasicServiceInitiator
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 ServiceRegistry
R
- The service role typeserviceRole
- The service rolepublic <R extends Service> ServiceBinding<R> locateServiceBinding(Class<R> serviceRole)
ServiceRegistryImplementor
locateServiceBinding
in interface ServiceRegistryImplementor
R
- generic return type.serviceRole
- The service role for which to locate a binding.null
public void destroy()
ServiceRegistryImplementor
destroy
in interface ServiceRegistryImplementor
public boolean isActive()
public ServiceRegistry getParentServiceRegistry()
ServiceRegistry
getParentServiceRegistry
in interface ServiceRegistry
public <R extends Service> R initiateService(ServiceInitiator<R> serviceInitiator)
initiateService
in interface ServiceBinding.ServiceLifecycleOwner
public <R extends Service> void configureService(ServiceBinding<R> binding)
configureService
in interface ServiceBinding.ServiceLifecycleOwner
public <R extends Service> void injectDependencies(ServiceBinding<R> binding)
injectDependencies
in interface ServiceBinding.ServiceLifecycleOwner
public <R extends Service> void startService(ServiceBinding<R> binding)
startService
in interface ServiceBinding.ServiceLifecycleOwner
public <R extends Service> void stopService(ServiceBinding<R> binding)
stopService
in interface ServiceBinding.ServiceLifecycleOwner
public void registerChild(ServiceRegistryImplementor child)
ServiceRegistryImplementor
registerChild
in interface ServiceRegistryImplementor
public void deRegisterChild(ServiceRegistryImplementor child)
ServiceRegistryImplementor
deRegisterChild
in interface ServiceRegistryImplementor
Copyright © 2018 JBoss by Red Hat. All rights reserved.