public class SDKContext extends Destroyable implements InitContext, AutoCloseable, Closeable
| 构造器和说明 |
|---|
SDKContext(com.tencent.polaris.api.config.Configuration configuration,
Manager plugins,
ValueContext valueContext)
构造器
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
com.tencent.polaris.api.config.Configuration |
getConfig() |
Extensions |
getExtensions() |
Supplier |
getPlugins() |
Collection<ServerServiceInfo> |
getServerServices() |
ValueContext |
getValueContext() |
void |
init() |
static SDKContext |
initContext()
通过默认配置初始化SDKContext
|
static SDKContext |
initContextByConfig(com.tencent.polaris.api.config.Configuration config)
通过配置对象初始化SDK上下文
|
static String |
parseHost(com.tencent.polaris.api.config.Configuration configuration) |
void |
registerDestroyHook(Destroyable destroyable) |
destroy, getName, isDestroyedpublic SDKContext(com.tencent.polaris.api.config.Configuration configuration,
Manager plugins,
ValueContext valueContext)
configuration - 配置plugins - 插件工厂valueContext - 上下文public ValueContext getValueContext()
getValueContext 在接口中 InitContextpublic void init()
throws PolarisException
PolarisExceptionpublic Extensions getExtensions()
public com.tencent.polaris.api.config.Configuration getConfig()
getConfig 在接口中 InitContextpublic Supplier getPlugins()
getPlugins 在接口中 InitContextpublic static SDKContext initContext() throws PolarisException
PolarisException - 初始化异常public static SDKContext initContextByConfig(com.tencent.polaris.api.config.Configuration config) throws PolarisException
config - 配置对象PolarisException - 初始化过程的异常public Collection<ServerServiceInfo> getServerServices()
getServerServices 在接口中 InitContextpublic static String parseHost(com.tencent.polaris.api.config.Configuration configuration)
public void registerDestroyHook(Destroyable destroyable)
public void close()
close 在接口中 Closeableclose 在接口中 AutoCloseableCopyright © 2021. All rights reserved.