Interface EssApplicationConfig


public interface EssApplicationConfig
An application's configuration, as a small language for reading and changing it.
 application.configuration().keys()                        // the whole catalogue, with values
 application.configuration().configured()                  // only what this application sets
 application.configuration().keys("CALCCACHE*")            // the catalogue, filtered
 application.configuration().get("DATACACHESIZE")          // one key
 application.configuration().set("DATACACHESIZE", "90M")
 application.configuration().delete("DATACACHESIZE")
 

Every key comes back as an EssApplicationConfiguration that can set or delete itself, so a caller that has found a key doesn't have to hold on to the application to act on it.

  • Method Details

    • keys

      Every configuration key the server publishes, each with its description and syntax, and with the value where this application sets one.

      Two calls behind one: the catalogue endpoint never returns values - not even for a key the application has set - and the configurations endpoint returns values without descriptions, so neither alone can answer "what can I set, and what is it now".

      Returns:
      the keys, in the order the server lists them
    • keys

      The catalogue, narrowed by a key pattern.
      Parameters:
      pattern - a key or a glob, e.g. CALCCACHE*; null or blank means everything
      Returns:
      the matching keys
    • configured

      Only the keys this application actually sets.
      Returns:
      the configured keys, with their values
    • get

      One key by name, whether or not the application sets it.
      Parameters:
      key - the key name
      Returns:
      the key, or empty if the server's catalogue has no such key
    • set

      Sets a key, adding it if the application didn't have it and replacing the value if it did.
      Parameters:
      key - the key name
      value - the value
      Returns:
      the setting as the server records it afterwards
    • delete

      void delete(String key)
      Removes a key from the application's configuration.
      Parameters:
      key - the key name