Nuxeo Enterprise Platform 5.4

org.nuxeo.runtime.binding
Class SimpleServiceProvider

java.lang.Object
  extended by org.nuxeo.runtime.binding.AbstractServiceProvider
      extended by org.nuxeo.runtime.binding.SimpleServiceProvider
All Implemented Interfaces:
ServiceProvider

public class SimpleServiceProvider
extends AbstractServiceProvider

Author:
Bogdan Stefanescu

Nested Class Summary
 class SimpleServiceProvider.Entry
           
 
Constructor Summary
SimpleServiceProvider()
          The default constructor is using a HashMap as the registry
SimpleServiceProvider(java.util.Map<java.lang.String,SimpleServiceProvider.Entry> registry)
           
 
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 org.nuxeo.runtime.binding.AbstractServiceProvider
getManager, setManager
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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 service
bindingKey - the binding key to use when caching bindings
Returns:
the service instance if any was found or null otherwise

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.