Class DefaultServiceProvider

java.lang.Object
org.nuxeo.runtime.api.DefaultServiceProvider
All Implemented Interfaces:
ServiceProvider

public class DefaultServiceProvider extends Object implements 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
  • Field Details

  • Constructor Details

    • DefaultServiceProvider

      public DefaultServiceProvider()
  • Method Details

    • setProvider

      public static void setProvider(ServiceProvider provider)
    • getProvider

      public static ServiceProvider getProvider()
    • getService

      public <T> T getService(Class<T> serviceClass)
      Description copied from interface: ServiceProvider
      Gets the service instance given its API class.
      Specified by:
      getService in interface ServiceProvider
    • registerService

      public <T> void registerService(Class<T> serviceClass, Class<?> implClass)
    • registerService

      public <T> void registerService(Class<T> serviceClass, Object impl)