Class SimplePropertySource

java.lang.Object
io.fluxcapacitor.common.application.SimplePropertySource
All Implemented Interfaces:
PropertySource

public class SimplePropertySource extends Object implements PropertySource
A simple in-memory implementation of the PropertySource interface backed by a Map.

This class is typically used for programmatic configuration, testing, or cases where property values are supplied dynamically at runtime from an explicit key-value source.

Example usage:


 Map<String, String> props = Map.of("api.key", "12345", "timeout", "1000");
 PropertySource propertySource = new SimplePropertySource(props);
 String apiKey = propertySource.get("api.key");
 
See Also:
  • Constructor Details

    • SimplePropertySource

      public SimplePropertySource()
  • Method Details

    • get

      public String get(String name)
      Retrieves the value associated with the given property name from the internal map.
      Specified by:
      get in interface PropertySource
      Parameters:
      name - the name of the property to retrieve
      Returns:
      the corresponding property value, or null if not present