Interface ConfigurationContext

All Known Implementing Classes:
DefaultConfigurationContext

public interface ConfigurationContext
An interface for classes that determine the environment a Configuration is running within.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the configuration contexts.
    boolean
    matches(String token, List<String> targetValues)
    Check whether the current system context matches one of the requested values in the specified scope
  • Method Details

    • matches

      boolean matches(String token, List<String> targetValues)
      Check whether the current system context matches one of the requested values in the specified scope
      Parameters:
      token - The name of the property to check
      targetValues - A list of possible values for the specified property, such as 'process.name=foo'
      Returns:
      True if the specified property currently has a value equal to one of the target values, false otherwise.
    • getContextKeyValues

      Collection<String> getContextKeyValues()
      Return the configuration contexts. This is the list of properties that may have been used to parse the configuration file. Implementations must be sure to return an immutable collection.
      Returns:
      the configuration contexts.