Package org.apache.dubbo.config
Class AbstractConfig
java.lang.Object
org.apache.dubbo.config.AbstractConfig
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractMethodConfig,ApplicationConfig,ConfigCenterConfig,MetadataReportConfig,MetricsConfig,ModuleConfig,MonitorConfig,ProtocolConfig,RegistryConfig,SslConfig,TracingConfig
Utility methods and public methods for parsing configuration
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendAttributes(Map<String, String> parameters, Object config) Put attributes of specify 'config' into 'parameters' argumentstatic voidstatic voidappendParameters(Map<String, String> parameters, Object config) static voidbooleangetId()The new instance of the AbstractConfig subclass should return empty metadata. The purpose is to get the attributes set by the user instead of the default value when therefresh()method handles attribute overrides.getMetaData(String prefix) static StringgetPluralTagName(Class<?> cls) static StringgetTagName(Class<?> cls) static StringgetTypePrefix(Class<? extends AbstractConfig> cls) inthashCode()booleanbooleanbooleanisValid()FIXME check @Parameter(required=true) and any conditions that need to match.voidoverrideWithConfig(AbstractConfig newOne, boolean overrideAll) voidrefresh()Dubbo config property overridevoidsetDefault(Boolean isDefault) voidvoidsetNeedRefresh(boolean needRefresh) final voidsetScopeModel(ScopeModel scopeModel) toString()
-
Constructor Details
-
AbstractConfig
public AbstractConfig() -
AbstractConfig
-
-
Method Details
-
getTagName
-
getPluralTagName
-
appendParameters
-
appendParameters
-
appendAttributes
Put attributes of specify 'config' into 'parameters' argument -
appendAttributes
-
getApplicationModel
-
getScopeModel
-
setScopeModel
-
getId
-
setId
-
getMetaData
The new instance of the AbstractConfig subclass should return empty metadata. The purpose is to get the attributes set by the user instead of the default value when the
refresh()method handles attribute overrides.The default value of the field should be set in the
Should be called after Config was fully initialized.checkDefault()method, which will be called at the end ofrefresh(), so that it will not affect the behavior of attribute overrides.Notice! This method should include all properties in the returning map, treat @Parameter differently compared to appendParameters?
// FIXME: this method should be completely replaced by appendParameters? // -- Url parameter may use key, but props override only use property name. So replace it with appendAttributes().- See Also:
-
getMetaData
-
getPrefixes
-
getTypePrefix
-
getConfigMode
-
overrideWithConfig
-
refresh
public void refresh()Dubbo config property override -
isRefreshed
-
isValid
FIXME check @Parameter(required=true) and any conditions that need to match. -
isDefault
-
setDefault
-
isNeedRefresh
-
setNeedRefresh
public void setNeedRefresh(boolean needRefresh) -
toString
-
equals
-
hashCode
public int hashCode()
-