public class SpiServiceRegistry extends Object implements ServiceRegistry
ServiceRegistry
that uses standard ServiceLoader to get
the providers| Constructor and Description |
|---|
SpiServiceRegistry() |
| Modifier and Type | Method and Description |
|---|---|
<T> Collection<T> |
lookupProviders(Class<T> providerClass)
Searches for implementations of a particular service class
|
<T> Collection<T> |
lookupProviders(Class<T> providerClass,
ClassLoader classLoader)
If
classLoader is null, then the current Thread.getContextClassLoader()
will be used
Searches for implementations of a particular service class
using the given class loader. |
public <T> Collection<T> lookupProviders(Class<T> providerClass, ClassLoader classLoader)
classLoader is null, then the current Thread.getContextClassLoader()
will be used
Searches for implementations of a particular service class
using the given class loader.lookupProviders in interface ServiceRegistryproviderClass - a Classobject indicating the
class or interface of the service providers being detected.classLoader - the class loader to be used to load
provider/configuration files and instantiate provider instances.
If null, it will be up to the implementation to choose a ClassLoaderCollection that yields provider objects for the given service, in some arbitrary order.public <T> Collection<T> lookupProviders(Class<T> providerClass)
lookupProviders in interface ServiceRegistryproviderClass - a Classobject indicating the
class or interface of the service providers being detected.Collection that yields provider objects for the given service, in some arbitrary order.Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.