Package org.apache.dubbo.rpc.model
Class ApplicationModel
java.lang.Object
org.apache.dubbo.rpc.model.ScopeModel
org.apache.dubbo.rpc.model.ApplicationModel
- All Implemented Interfaces:
ExtensionAccessor
ExtensionLoader, DubboBootstrap and this class are at present designed to be
singleton or static (by itself totally static or uses some static fields). So the instances
returned from them are of process scope. If you want to support multiple dubbo servers in one
single process, you may need to refactor those three classes.
Represent an application which is using Dubbo and store basic metadata info for using during the processing of RPC invoking.
ApplicationModel includes many ProviderModel which is about published services and many Consumer Model which is about subscribed services.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClassLoader(ClassLoader classLoader) static Collection<ConsumerModel> Deprecated.static Collection<ProviderModel> Deprecated.static ApplicationModelDuring destroying the default FrameworkModel, the FrameworkModel.defaultModel() or ApplicationModel.defaultModel() will return a broken model, maybe cause unpredictable problem.static StringDeprecated.Replace togetApplicationName()static ApplicationConfigDeprecated.Replace togetCurrentConfig()static ConfigManagerDeprecated.Replace togetApplicationConfigManager()static ConsumerModelgetConsumerModel(String serviceKey) Deprecated.ConsumerModel should fetch from contextstatic EnvironmentDeprecated.Replace toScopeModel.modelEnvironment()static ExecutorRepositoryDeprecated.Replace togetApplicationExecutorRepository()static StringgetName()Deprecated.Replace togetApplicationName()static ProviderModelgetProviderModel(String serviceKey) Deprecated.static ServiceRepositoryDeprecated.Replace togetApplicationServiceRepository()Get current model's environment.booleanstatic ApplicationModelofNullable(ApplicationModel applicationModel) voidremoveClassLoader(ClassLoader classLoader) voidremoveModule(ModuleModel moduleModel) static voidreset()Deprecated.voidsetConfigManager(ConfigManager configManager) Deprecated.only for utvoidsetDeployer(ApplicationDeployer deployer) voidsetEnvironment(Environment environment) Deprecated.only for utvoidsetServiceRepository(ServiceRepository serviceRepository) Deprecated.only for utMethods inherited from class org.apache.dubbo.rpc.model.ScopeModel
addClassLoaderListener, addDestroyListener, destroy, getAttribute, getAttribute, getAttributes, getBean, getBeanFactory, getClassLoaders, getDesc, getExtensionDirector, getInternalId, getModelEnvironment, getModelName, getOrRegisterBean, getParent, getScope, isDestroyed, isInternal, setAttribute, setModelName, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.dubbo.common.extension.ExtensionAccessor
getActivateExtensions, getAdaptiveExtension, getDefaultExtension, getExtension, getExtensionLoader, getFirstActivateExtension, getSupportedExtensions
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
ofNullable
-
defaultModel
During destroying the default FrameworkModel, the FrameworkModel.defaultModel() or ApplicationModel.defaultModel() will return a broken model, maybe cause unpredictable problem. Recommendation: Avoid using the default model as much as possible.- Returns:
- the global default ApplicationModel
-
getFrameworkModel
-
newModule
-
modelEnvironment
Description copied from class:ScopeModelGet current model's environment. Note: This method should not start with `get` or it would be invoked due to Spring boot refresh.- Specified by:
modelEnvironmentin classScopeModel- See Also:
-
getApplicationConfigManager
-
getApplicationServiceRepository
-
getApplicationExecutorRepository
-
NotExistApplicationConfig
public boolean NotExistApplicationConfig() -
getCurrentConfig
-
getApplicationName
-
tryGetApplicationName
-
removeModule
-
getModuleModels
-
getPubModuleModels
-
getDefaultModule
-
getInternalModule
-
addClassLoader
- Overrides:
addClassLoaderin classScopeModel
-
removeClassLoader
- Overrides:
removeClassLoaderin classScopeModel
-
getDeployer
-
setDeployer
-
allConsumerModels
Deprecated. -
allProviderModels
Deprecated. -
getProviderModel
Deprecated. -
getConsumerModel
Deprecated.ConsumerModel should fetch from context -
getEnvironment
Deprecated.Replace toScopeModel.modelEnvironment() -
getConfigManager
Deprecated.Replace togetApplicationConfigManager() -
getServiceRepository
Deprecated.Replace togetApplicationServiceRepository() -
getExecutorRepository
Deprecated.Replace togetApplicationExecutorRepository() -
getApplicationConfig
Deprecated.Replace togetCurrentConfig() -
getName
Deprecated.Replace togetApplicationName() -
getApplication
Deprecated.Replace togetApplicationName() -
reset
Deprecated. -
setEnvironment
Deprecated.only for ut -
setConfigManager
Deprecated.only for ut -
setServiceRepository
Deprecated.only for ut
-
ServiceRepository.allConsumerModels()