类 AbstractConfig
- java.lang.Object
-
- org.apache.dubbo.config.AbstractConfig
-
- 所有已实现的接口:
Serializable
- 直接已知子类:
AbstractMethodConfig,ApplicationConfig,ConfigCenterConfig,MetadataReportConfig,MetricsConfig,ModuleConfig,MonitorConfig,ProtocolConfig,RegistryConfig,SslConfig
public abstract class AbstractConfig extends Object implements Serializable
Utility methods and public methods for parsing configuration- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 AbstractConfig()
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddIntoConfigManager()AddinstanceintoConfigManagerstatic voidappendAttributes(Map<String,String> parameters, Object config)Put attributes of specify 'config' into 'parameters' argumentstatic voidappendParameters(Map<String,String> parameters, Object config)static voidappendParameters(Map<String,String> parameters, Object config, String prefix)booleanequals(Object obj)StringgetId()Map<String,String>getMetaData()The new instance of the AbstractConfig subclass should return empty metadata. The purpose is is to get the attributes set by the user instead of the default value when therefresh()method handles attribute overrides.static StringgetPluralTagName(Class<?> cls)List<String>getPrefixes()static StringgetTagName(Class<?> cls)static StringgetTypePrefix(Class<? extends AbstractConfig> cls)inthashCode()BooleanisDefault()booleanisRefreshed()booleanisValid()FIXME check @Parameter(required=true) and any conditions that need to match.voidrefresh()Dubbo config property overridevoidsetDefault(Boolean isDefault)voidsetId(String id)StringtoString()voidupdateIdIfAbsent(String value)
-
-
-
方法详细资料
-
appendParameters
public static void appendParameters(Map<String,String> parameters, Object config)
-
appendParameters
public static void appendParameters(Map<String,String> parameters, Object config, String prefix)
-
appendAttributes
public static void appendAttributes(Map<String,String> parameters, Object config)
Put attributes of specify 'config' into 'parameters' argument- 参数:
parameters-config-
-
getId
@Parameter(excluded=true, attribute=true) public String getId()
-
setId
public void setId(String id)
-
updateIdIfAbsent
public void updateIdIfAbsent(String value)
-
getMetaData
public Map<String,String> getMetaData()
The new instance of the AbstractConfig subclass should return empty metadata. The purpose is 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().
-
getPrefixes
@Parameter(excluded=true, attribute=false) public List<String> getPrefixes()
-
getTypePrefix
public static String getTypePrefix(Class<? extends AbstractConfig> cls)
-
refresh
public void refresh()
Dubbo config property override
-
isRefreshed
@Parameter(excluded=true, attribute=false) public boolean isRefreshed()
-
isValid
@Parameter(excluded=true, attribute=false) public boolean isValid()
FIXME check @Parameter(required=true) and any conditions that need to match.
-
isDefault
@Parameter(excluded=true, attribute=false) public Boolean isDefault()
-
setDefault
public void setDefault(Boolean isDefault)
-
addIntoConfigManager
@PostConstruct public void addIntoConfigManager()
AddinstanceintoConfigManagerCurrent method will invoked by Spring or Java EE container automatically, or should be triggered manually.
- 从以下版本开始:
- 2.7.5
- 另请参阅:
ConfigManager.addConfig(AbstractConfig)
-
-