org.hibernate.service.internal
Class AbstractServiceRegistryImpl
java.lang.Object
   org.hibernate.service.internal.AbstractServiceRegistryImpl
org.hibernate.service.internal.AbstractServiceRegistryImpl
- All Implemented Interfaces: 
- ServiceRegistry, ServiceBinding.ServiceLifecycleOwner, ServiceRegistryImplementor
- Direct Known Subclasses: 
- SessionFactoryServiceRegistryImpl, StandardServiceRegistryImpl
- public abstract class AbstractServiceRegistryImpl 
- extends Object- implements ServiceRegistryImplementor, ServiceBinding.ServiceLifecycleOwner
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
AbstractServiceRegistryImpl
protected AbstractServiceRegistryImpl()
AbstractServiceRegistryImpl
protected AbstractServiceRegistryImpl(ServiceRegistryImplementor parent)
AbstractServiceRegistryImpl
public AbstractServiceRegistryImpl(BootstrapServiceRegistry bootstrapServiceRegistry)
createServiceBinding
protected <R extends Service> void createServiceBinding(ServiceInitiator<R> initiator)
- 
 
- 
 
createServiceBinding
protected <R extends Service> void createServiceBinding(ProvidedService<R> providedService)
- 
 
- 
 
getParentServiceRegistry
public ServiceRegistry getParentServiceRegistry()
- Description copied from interface: ServiceRegistry
- Retrieve this registry's parent registry.
 
- 
- Specified by:
- getParentServiceRegistryin interface- ServiceRegistry
 
- 
- Returns:
- The parent registry.  May be null.
 
locateServiceBinding
public <R extends Service> ServiceBinding<R> locateServiceBinding(Class<R> serviceRole)
- Description copied from interface: ServiceRegistryImplementor
- Locate the binding for the given role.  Should, generally speaking, look into parent registry if one.
 
- 
- Specified by:
- locateServiceBindingin interface- ServiceRegistryImplementor
 
- 
- Type Parameters:
- R- generic return type.
- Parameters:
- serviceRole- The service role for which to locate a binding.
- Returns:
- The located binding; may be null
 
locateServiceBinding
protected <R extends Service> ServiceBinding<R> locateServiceBinding(Class<R> serviceRole,
                                                                     boolean checkParent)
- 
 
- 
 
getService
public <R extends Service> R getService(Class<R> serviceRole)
- Description copied from interface: ServiceRegistry
- Retrieve a service by role.  If service is not found, but a BasicServiceInitiatoris 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...
 
- 
- Specified by:
- getServicein interface- ServiceRegistry
 
- 
- Type Parameters:
- R- The service role type
- Parameters:
- serviceRole- The service role
- Returns:
- The requested service.
 
registerService
protected <R extends Service> void registerService(ServiceBinding<R> serviceBinding,
                                                   R service)
- 
 
- 
 
createService
protected <R extends Service> R createService(ServiceBinding<R> serviceBinding)
- 
 
- 
 
injectDependencies
public <R extends Service> void injectDependencies(ServiceBinding<R> serviceBinding)
- 
- Specified by:
- injectDependenciesin interface- ServiceBinding.ServiceLifecycleOwner
 
- 
 
startService
public <R extends Service> void startService(ServiceBinding<R> serviceBinding)
- 
- Specified by:
- startServicein interface- ServiceBinding.ServiceLifecycleOwner
 
- 
 
destroy
public void destroy()
- Description copied from interface: ServiceRegistryImplementor
- Release resources
 
- 
- Specified by:
- destroyin interface- ServiceRegistryImplementor
 
- 
 
stopService
public <R extends Service> void stopService(ServiceBinding<R> binding)
- 
- Specified by:
- stopServicein interface- ServiceBinding.ServiceLifecycleOwner
 
- 
 
Copyright © 2001-2012 Red Hat, Inc.  All Rights Reserved.