org.nuxeo.runtime.binding
Class SimpleServiceProvider
java.lang.Object
org.nuxeo.runtime.binding.AbstractServiceProvider
org.nuxeo.runtime.binding.SimpleServiceProvider
- All Implemented Interfaces:
- ServiceProvider
public class SimpleServiceProvider
- extends AbstractServiceProvider
- Author:
- Bogdan Stefanescu
Method Summary |
void |
destroy()
The provider is no more needed. |
java.util.Map<java.lang.String,SimpleServiceProvider.Entry> |
getRegistry()
|
java.lang.Object |
getService(java.lang.Class<?> serviceClass,
java.lang.String bindingKey)
Named service lookup is not yet supported (so bindingKey will be ignored at lookup time) |
void |
registerService(java.lang.Class<?> itf,
java.lang.Object serviceInstance)
|
void |
unregisterService(java.lang.Class<?> itf)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleServiceProvider
public SimpleServiceProvider()
- The default constructor is using a
HashMap
as the registry
SimpleServiceProvider
public SimpleServiceProvider(java.util.Map<java.lang.String,SimpleServiceProvider.Entry> registry)
registerService
public void registerService(java.lang.Class<?> itf,
java.lang.Object serviceInstance)
unregisterService
public void unregisterService(java.lang.Class<?> itf)
getRegistry
public java.util.Map<java.lang.String,SimpleServiceProvider.Entry> getRegistry()
destroy
public void destroy()
- Description copied from interface:
ServiceProvider
- The provider is no more needed.
It should immediately release any system resources.
getService
public java.lang.Object getService(java.lang.Class<?> serviceClass,
java.lang.String bindingKey)
- Named service lookup is not yet supported (so bindingKey will be ignored at lookup time)
- Parameters:
serviceClass
- the interface of the servicebindingKey
- the binding key to use when caching bindings
- Returns:
- the service instance if any was found or null otherwise
Copyright © 2010 Nuxeo SAS. All Rights Reserved.