public abstract class AbstractConfigFile extends Object implements ConfigFile, RepositoryChangeListener
| Constructor and Description |
|---|
AbstractConfigFile(String namespace,
ConfigRepository configRepository) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
onRepositoryChange(String namespace,
Properties newProperties)
Invoked when config repository changes.
|
boolean |
removeChangeListener(ConfigFileChangeListener listener)
Remove the change listener
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfigFileFormat, getContent, hasContentpublic AbstractConfigFile(String namespace, ConfigRepository configRepository)
public String getNamespace()
ConfigFilegetNamespace in interface ConfigFilepublic void onRepositoryChange(String namespace, Properties newProperties)
RepositoryChangeListeneronRepositoryChange in interface RepositoryChangeListenernamespace - the namespace of this repository changenewProperties - the properties after changepublic void addChangeListener(ConfigFileChangeListener listener)
ConfigFileaddChangeListener in interface ConfigFilelistener - the config file change listenerpublic boolean removeChangeListener(ConfigFileChangeListener listener)
ConfigFileremoveChangeListener in interface ConfigFilelistener - the specific config change listener to removepublic ConfigSourceType getSourceType()
ConfigFilegetSourceType in interface ConfigFileCopyright © 2022 Ctrip, Inc.. All rights reserved.