public abstract class AbstractServiceRegistry extends Object implements ServiceRegistry
ServiceRegistry that enforce common behaviour for all implementations.| Constructor and Description |
|---|
AbstractServiceRegistry() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract <T> Collection<T> |
doLookupProviders(Class<T> providerClass,
ClassLoader loader)
Retrieves a collection of providers.
|
<T> T |
lookupProvider(Class<T> providerClass,
ClassLoader classLoader)
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 final <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.protected abstract <T> Collection<T> doLookupProviders(Class<T> providerClass, ClassLoader loader)
{@link #lookupProviders(Class, ClassLoader)},
and {@code {@link #lookupProvider(Class, ClassLoader)}}.providerClass - a Classobject indicating the class or interface of the service providers being detected.loader - 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 final <T> T lookupProvider(Class<T> providerClass, ClassLoader classLoader)
lookupProvider 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 ClassLoaderCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.