public interface ServiceManager
ServiceManager is used to manage uniqueness of services and runtime discovery of service implementations.
Uniqueness is meant in the scope of the SearchFactory, as there is a single ServiceManager instance
per SearchFactory.
Any service requested should be released using releaseService(Class) when it's not needed anymore.| Modifier and Type | Method and Description |
|---|---|
void |
releaseAllServices()
Stops all services.
|
<S extends Service> |
releaseService(Class<S> serviceRole)
Releases the service in the specified service role.
|
<S extends Service> |
requestService(Class<S> serviceRole)
Gets the service in the specified service role.
|
<S extends Service> S requestService(Class<S> serviceRole)
serviceRole - the service to retrieve. Cannot be null.IllegalArgumentException - in case the serviceRole is null<S extends Service> void releaseService(Class<S> serviceRole)
serviceRole - the service to be released. Cannot be null.IllegalArgumentException - in case the serviceRole is nullvoid releaseAllServices()
Copyright © 2006–2014 Hibernate. All rights reserved.