Package org.nuxeo.runtime.api
Class DefaultServiceProvider
java.lang.Object
org.nuxeo.runtime.api.DefaultServiceProvider
- All Implemented Interfaces:
ServiceProvider
A service provider.
A service provider is used by the framework to be able to change the local services are found
For example, you may want to use a simple service provider for testing purpose to avoid loading the nuxeo runtime framework to register services.
- Author:
- Bogdan Stefanescu
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ServiceProvider
<T> T
getService
(Class<T> serviceClass) Gets the service instance given its API class.<T> void
registerService
(Class<T> serviceClass, Class<?> implClass) <T> void
registerService
(Class<T> serviceClass, Object impl) static void
setProvider
(ServiceProvider provider)
-
Field Details
-
registry
-
-
Constructor Details
-
DefaultServiceProvider
public DefaultServiceProvider()
-
-
Method Details
-
setProvider
-
getProvider
-
getService
Description copied from interface:ServiceProvider
Gets the service instance given its API class.- Specified by:
getService
in interfaceServiceProvider
-
registerService
-
registerService
-