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,
Class[] argTypes,
Object[] args)
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,
Class[] argsType,
Object[] args)
Load s.
|
static <S> S |
load(Class<S> service,
String activateName,
ClassLoader loader)
Specify classLoader to load the service provider
|
static <S> S |
load(Class<S> service,
String activateName,
Object[] args)
Load s.
|
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> S load(Class<S> service, String activateName, Object[] args) throws EnhancedServiceNotFoundException
S - the type parameterservice - the serviceactivateName - the activate nameargs - the argsEnhancedServiceNotFoundException - the enhanced service not found exceptionpublic static <S> S load(Class<S> service, String activateName, Class[] argsType, Object[] args) throws EnhancedServiceNotFoundException
S - the type parameterservice - the serviceactivateName - the activate nameargsType - the args typeargs - the argsEnhancedServiceNotFoundException - 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, Class[] argTypes, Object[] args) throws IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException
S - the type parameterservice - the serviceimplClazz - the impl clazzargTypes - the arg typesargs - the argsIllegalAccessException - the illegal access exceptionInstantiationException - the instantiation exceptionNoSuchMethodException - the no such method exceptionInvocationTargetException - the invocation target exceptionCopyright © 2019 Seata. All rights reserved.