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, wait
configureService, initiateService
protected 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()
ServiceRegistry
getParentServiceRegistry
in interface ServiceRegistry
public <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
protected <R extends Service> ServiceBinding<R> locateServiceBinding(Class<R> serviceRole, boolean checkParent)
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 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.ServiceLifecycleOwner
public <R extends Service> void startService(ServiceBinding<R> serviceBinding)
startService
in interface ServiceBinding.ServiceLifecycleOwner
public void destroy()
ServiceRegistryImplementor
destroy
in interface ServiceRegistryImplementor
public <R extends Service> void stopService(ServiceBinding<R> binding)
stopService
in interface ServiceBinding.ServiceLifecycleOwner
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.