org.nuxeo.runtime.binding
Class ServiceManager
java.lang.Object
org.nuxeo.runtime.binding.ServiceManager
- All Implemented Interfaces:
- ServiceManager
public class ServiceManager
- extends Object
- implements ServiceManager
- Author:
- Bogdan Stefanescu
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
providers
protected ServiceProvider[] providers
bindings
protected Map<String,Binding> bindings
ServiceManager
public ServiceManager(ServiceProvider... providers)
ServiceManager
public ServiceManager()
throws NamingException
- Throws:
NamingException
getService
public <T> T getService(Class<T> serviceClass)
- Description copied from interface:
ServiceManager
- Gets a service implementation given the interface class.
- Specified by:
getService
in interface ServiceManager
- Parameters:
serviceClass
- the service interface class
- Returns:
- the implementation
getService
public <T> T getService(Class<T> serviceClass,
String key)
throws Exception
- Description copied from interface:
ServiceManager
- 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.
- Specified by:
getService
in interface ServiceManager
- Parameters:
serviceClass
- the service interface classkey
- the service name
- Returns:
- the implementation
- Throws:
Exception
findService
public Object findService(Class<?> serviceClass,
String bindingKey)
registerBinding
public void registerBinding(String name,
Binding binding)
unregisterBinding
public void unregisterBinding(String name)
clearBindings
public void clearBindings()
getProviders
public ServiceProvider[] getProviders()
destroyProviders
protected void destroyProviders()
setProviders
public void setProviders(ServiceProvider... providers)
addProvider
public void addProvider(ServiceProvider provider)
Copyright © 2010 Nuxeo SAS. All Rights Reserved.