Package org.hibernate.service.spi
Interface ServiceRegistryImplementor
- All Superinterfaces:
AutoCloseable,ServiceRegistry
- All Known Subinterfaces:
SessionFactoryServiceRegistry
- All Known Implementing Classes:
AbstractServiceRegistryImpl,BootstrapServiceRegistryImpl,SessionFactoryServiceRegistryImpl,StandardServiceRegistryImpl
Additional integration contracts for a service registry.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()voidWhen a registry is created with a parent, the parent is notified of the child via this callback.voiddestroy()Release resources<T extends Service>
@Nullable TfromRegistryOrChildren(Class<T> serviceRole) <R extends Service>
@Nullable ServiceBinding<R> locateServiceBinding(Class<R> serviceRole) Locate the binding for the given role.voidWhen a registry is created with a parent, the parent is notified of the child via this callback.Methods inherited from interface org.hibernate.service.ServiceRegistry
getParentServiceRegistry, getService, requireService
-
Method Details
-
locateServiceBinding
Locate the binding for the given role. Should, generally speaking, look into parent registry if one.- Type Parameters:
R- generic return type.- Parameters:
serviceRole- The service role for which to locate a binding.- Returns:
- The located binding; may be
null
-
close
default void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceServiceRegistry
-
destroy
void destroy()Release resources -
registerChild
When a registry is created with a parent, the parent is notified of the child via this callback. -
deRegisterChild
When a registry is created with a parent, the parent is notified of the child via this callback. -
fromRegistryOrChildren
-