public abstract class AbstractServiceRegistryImpl extends Object implements ServiceRegistryImplementor, ServiceBinding.ServiceLifecycleOwner
| Modifier and Type | Field and Description |
|---|---|
static String |
ALLOW_CRAWLING |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractServiceRegistryImpl() |
protected |
AbstractServiceRegistryImpl(boolean autoCloseRegistry) |
|
AbstractServiceRegistryImpl(BootstrapServiceRegistry bootstrapServiceRegistry) |
|
AbstractServiceRegistryImpl(BootstrapServiceRegistry bootstrapServiceRegistry,
boolean autoCloseRegistry) |
protected |
AbstractServiceRegistryImpl(ServiceRegistryImplementor parent) |
protected |
AbstractServiceRegistryImpl(ServiceRegistryImplementor parent,
boolean autoCloseRegistry) |
| Modifier and Type | Method and Description |
|---|---|
protected <R extends Service> |
createService(ServiceBinding<R> serviceBinding) |
protected <R extends Service> |
createServiceBinding(ProvidedService<R> providedService) |
protected <R extends Service> |
createServiceBinding(ServiceInitiator<R> initiator) |
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> |
injectDependencies(ServiceBinding<R> serviceBinding) |
boolean |
isActive() |
<R extends Service> |
locateServiceBinding(Class<R> serviceRole)
Locate the binding for the given role.
|
protected <R extends Service> |
locateServiceBinding(Class<R> serviceRole,
boolean checkParent) |
void |
registerChild(ServiceRegistryImplementor child)
When a registry is created with a parent, the parent is notified of the child
via this callback.
|
protected <R extends Service> |
registerService(ServiceBinding<R> serviceBinding,
R service) |
<R extends Service> |
startService(ServiceBinding<R> serviceBinding) |
<R extends Service> |
stopService(ServiceBinding<R> binding) |
protected void |
visitServiceBindings(Consumer<ServiceBinding> action) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloserequireServiceconfigureService, initiateServicepublic static final String ALLOW_CRAWLING
protected AbstractServiceRegistryImpl()
protected AbstractServiceRegistryImpl(boolean autoCloseRegistry)
protected AbstractServiceRegistryImpl(ServiceRegistryImplementor parent)
protected AbstractServiceRegistryImpl(ServiceRegistryImplementor parent, boolean autoCloseRegistry)
public AbstractServiceRegistryImpl(BootstrapServiceRegistry bootstrapServiceRegistry)
public AbstractServiceRegistryImpl(BootstrapServiceRegistry bootstrapServiceRegistry, boolean autoCloseRegistry)
protected <R extends Service> void createServiceBinding(ServiceInitiator<R> initiator)
protected <R extends Service> void createServiceBinding(ProvidedService<R> providedService)
protected void visitServiceBindings(Consumer<ServiceBinding> action)
public ServiceRegistry getParentServiceRegistry()
ServiceRegistrygetParentServiceRegistry in interface ServiceRegistrypublic <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.nullprotected <R extends Service> ServiceBinding<R> locateServiceBinding(Class<R> serviceRole, boolean checkParent)
public <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 roleprotected <R extends Service> void registerService(ServiceBinding<R> serviceBinding, R service)
protected <R extends Service> R createService(ServiceBinding<R> serviceBinding)
public <R extends Service> void injectDependencies(ServiceBinding<R> serviceBinding)
injectDependencies in interface ServiceBinding.ServiceLifecycleOwnerpublic <R extends Service> void startService(ServiceBinding<R> serviceBinding)
startService in interface ServiceBinding.ServiceLifecycleOwnerpublic boolean isActive()
public void destroy()
ServiceRegistryImplementordestroy in interface ServiceRegistryImplementorpublic <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 © 2019 JBoss by Red Hat. All rights reserved.