public class EnhancedServiceLoader extends Object
| 构造器和说明 |
|---|
EnhancedServiceLoader() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <S> List<Class> |
getAllExtensionClass(Class<S> service)
Get all the extension classes, follow LoadLevel defined and sort order
|
static <S> List<Class> |
getAllExtensionClass(Class<S> service,
ClassLoader loader)
Get all the extension classes, follow LoadLevel defined and sort order
|
protected static <S> S |
initInstance(Class<S> service,
Class implClazz)
init instance
|
static <S> S |
load(Class<S> service)
load service provider
|
static <S> S |
load(Class<S> service,
ClassLoader loader)
Specify classLoader to load the service provider
|
static <S> S |
load(Class<S> service,
String activateName)
load service provider
|
static <S> S |
load(Class<S> service,
String activateName,
ClassLoader loader)
Specify classLoader to load the service provider
|
static <S> List<S> |
loadAll(Class<S> service)
get all implements
|
public static <S> S load(Class<S> service, ClassLoader loader) throws EnhancedServiceNotFoundException
S - the type parameterservice - the serviceloader - the loaderEnhancedServiceNotFoundException - the enhanced service not found exceptionpublic static <S> S load(Class<S> service) throws EnhancedServiceNotFoundException
S - the type parameterservice - the serviceEnhancedServiceNotFoundException - the enhanced service not found exceptionpublic static <S> S load(Class<S> service, String activateName) throws EnhancedServiceNotFoundException
S - the type parameterservice - the serviceactivateName - the activate nameEnhancedServiceNotFoundException - the enhanced service not found exceptionpublic static <S> S load(Class<S> service, String activateName, ClassLoader loader) throws EnhancedServiceNotFoundException
S - the type parameterservice - the serviceactivateName - the activate nameloader - the loaderEnhancedServiceNotFoundException - the enhanced service not found exceptionpublic static <S> List<S> loadAll(Class<S> service)
S - the type parameterservice - the servicepublic static <S> List<Class> getAllExtensionClass(Class<S> service)
S - the type parameterservice - the servicepublic static <S> List<Class> getAllExtensionClass(Class<S> service, ClassLoader loader)
S - the type parameterservice - the serviceloader - the loaderprotected static <S> S initInstance(Class<S> service, Class implClazz) throws IllegalAccessException, InstantiationException
S - the type parameterservice - the serviceimplClazz - the impl clazzIllegalAccessException - the illegal access exceptionInstantiationException - the instantiation exceptionCopyright © 2019 Seata. All rights reserved.