public interface ServiceRegistry
ServiceLoader
directly are the ability to inject a different
lookup mechanism and to facilitate testing.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 loader)
Searches for implementations of a particular service class
using the given class loader.
|
<T> Collection<T> lookupProviders(Class<T> providerClass, ClassLoader loader)
providerClass
- a Class
object 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 ClassLoader
Collection
that yields provider objects for the given service, in some arbitrary order.<T> Collection<T> lookupProviders(Class<T> providerClass)
providerClass
- a Class
object 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.