All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ctrip.framework.apollo.ConfigFile Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package com.ctrip.framework.apollo;

import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;

/**
 * @author Jason Song([email protected])
 */
public interface ConfigFile {
  /**
   * Get file content of the namespace
   * @return file content, {@code null} if there is no content
   */
  String getContent();

  /**
   * Whether the config file has any content
   * @return true if it has content, false otherwise.
   */
  boolean hasContent();

  /**
   * Get the namespace of this config file instance
   * @return the namespace
   */
  String getNamespace();

  /**
   * Get the file format of this config file instance
   * @return the config file format enum
   */
  ConfigFileFormat getConfigFileFormat();

  /**
   * Add change listener to this config file instance.
   *
   * @param listener the config file change listener
   */
  void addChangeListener(ConfigFileChangeListener listener);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy