public abstract class AbstractConfigFile extends Object implements ConfigFile, RepositoryChangeListener
| 构造器和说明 |
|---|
AbstractConfigFile(String namespace,
ConfigRepository configRepository) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addChangeListener(ConfigFileChangeListener listener)
Add change listener to this config file instance.
|
String |
getNamespace()
Get the namespace of this config file instance
|
ConfigSourceType |
getSourceType()
Return the config's source type, i.e. where is the config loaded from
|
void |
onRepositoryChange(String namespace,
Properties newProperties)
Invoked when config repository changes.
|
boolean |
removeChangeListener(ConfigFileChangeListener listener)
Remove the change listener
|
getConfigFileFormat, getContent, hasContentpublic AbstractConfigFile(String namespace, ConfigRepository configRepository)
public String getNamespace()
ConfigFilegetNamespace 在接口中 ConfigFilepublic void onRepositoryChange(String namespace, Properties newProperties)
RepositoryChangeListeneronRepositoryChange 在接口中 RepositoryChangeListenernamespace - the namespace of this repository changenewProperties - the properties after changepublic void addChangeListener(ConfigFileChangeListener listener)
ConfigFileaddChangeListener 在接口中 ConfigFilelistener - the config file change listenerpublic boolean removeChangeListener(ConfigFileChangeListener listener)
ConfigFileremoveChangeListener 在接口中 ConfigFilelistener - the specific config change listener to removepublic ConfigSourceType getSourceType()
ConfigFilegetSourceType 在接口中 ConfigFileCopyright © 2019 Ctrip, Inc.. All rights reserved.