Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime
Interface ServiceManager

All Known Implementing Classes:
ServiceManager

public interface ServiceManager

A service manager. This interface was created to be able to plug different service managers in Framework.

Author:
Bogdan Stefanescu

Method Summary
<T> T
getService(Class<T> serviceClass)
          Gets a service implementation given the interface class.
<T> T
getService(Class<T> serviceClass, String name)
          Gets a service implementation given the interface class and a name.
 

Method Detail

getService

<T> T getService(Class<T> serviceClass)
             throws Exception
Gets a service implementation given the interface class.

Type Parameters:
T -
Parameters:
serviceClass - the service interface class
Returns:
the implementation
Throws:
Exception

getService

<T> T getService(Class<T> serviceClass,
                 String name)
             throws Exception
Gets a service implementation given the interface class and a name.

This is useful to lookup services that are not singletons and can be identified using a service name.

Type Parameters:
T -
Parameters:
serviceClass - the service interface class
name - the service name
Returns:
the implementation
Throws:
Exception

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.