
org.hibernate.service.ServiceRegistry Maven / Gradle / Ivy
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.service;
/**
* A registry of {@link Service services}.
*
* @author Steve Ebersole
*/
public interface ServiceRegistry {
/**
* Retrieve this registry's parent registry.
*
* @return The parent registry. May be null.
*/
public ServiceRegistry getParentServiceRegistry();
/**
* Retrieve a service by role. If service is not found, but a {@link org.hibernate.service.spi.ServiceInitiator} is
* registered for this service role, the service will be initialized and returned.
*
* NOTE: We cannot return {@code >} here because the service might come from the parent...
*
* @param serviceRole The service role
* @param The service role type
*
* @return The requested service.
*
* @throws UnknownServiceException Indicates the service was not known.
*/
public R getService(Class serviceRole);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy