public abstract class AbstractServiceRegistryImpl extends Object implements ServiceRegistryImplementor, ServiceBinding.ServiceLifecycleOwner
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractServiceRegistryImpl() |
|
AbstractServiceRegistryImpl(BootstrapServiceRegistry bootstrapServiceRegistry) |
protected |
AbstractServiceRegistryImpl(ServiceRegistryImplementor parent) |
| 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 |
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) |
<R extends Service> |
locateServiceBinding(Class<R> serviceRole)
Locate the binding for the given role.
|
protected <R extends Service> |
locateServiceBinding(Class<R> serviceRole,
boolean checkParent) |
protected <R extends Service> |
registerService(ServiceBinding<R> serviceBinding,
R service) |
<R extends Service> |
startService(ServiceBinding<R> serviceBinding) |
<R extends Service> |
stopService(ServiceBinding<R> binding) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconfigureService, initiateServiceprotected AbstractServiceRegistryImpl()
protected AbstractServiceRegistryImpl(ServiceRegistryImplementor parent)
public AbstractServiceRegistryImpl(BootstrapServiceRegistry bootstrapServiceRegistry)
protected <R extends Service> void createServiceBinding(ServiceInitiator<R> initiator)
protected <R extends Service> void createServiceBinding(ProvidedService<R> providedService)
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)
ServiceRegistryBasicServiceInitiator 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 void destroy()
ServiceRegistryImplementordestroy in interface ServiceRegistryImplementorpublic <R extends Service> void stopService(ServiceBinding<R> binding)
stopService in interface ServiceBinding.ServiceLifecycleOwnerCopyright © 2012 JBoss by Red Hat. All Rights Reserved.