Class ConfigResolver

java.lang.Object
org.gridgain.internal.mcp.config.ConfigResolver

public final class ConfigResolver extends Object
Unified configuration resolver with 4-tier fallback: 1. Tool arguments (highest priority) 2. Environment variables 3. Default values (lowest priority)
  • Method Details

    • getString

      @NotNull public static @NotNull String getString(@Nullable @Nullable Map<String,Object> arguments, String argKey, EnvironmentKey envKey, boolean required)
      Resolve string value with 4-tier fallback.
      Parameters:
      arguments - Tool arguments map (can be null/empty)
      argKey - Argument key
      envKey - Environment variable key
      required - Whether the value is required (throws if missing)
      Returns:
      Resolved value
    • getString

      @NotNull public static @NotNull String getString(@Nullable @Nullable Map<String,Object> arguments, String argKey, EnvironmentKey envKey)
      Resolve string value (non-required).
    • getStringFromEnv

      @NotNull public static @NotNull String getStringFromEnv(EnvironmentKey envKey, boolean required)
      Resolve string value from environment only.
    • getInt

      public static int getInt(@Nullable @Nullable Map<String,Object> arguments, String argKey, EnvironmentKey envKey)
      Resolve integer value with 4-tier fallback.
    • getIntFromEnv

      public static int getIntFromEnv(EnvironmentKey envKey)
      Resolve integer value from environment only.
    • getLong

      public static long getLong(@Nullable @Nullable Map<String,Object> arguments, String argKey, EnvironmentKey envKey)
      Resolve long value with 4-tier fallback.
    • getLongFromEnv

      public static long getLongFromEnv(EnvironmentKey envKey)
      Resolve long value from environment only.
    • getBoolean

      public static boolean getBoolean(@Nullable @Nullable Map<String,Object> arguments, String argKey, EnvironmentKey envKey)
      Resolve boolean value with 4-tier fallback.
    • getBooleanFromEnv

      public static boolean getBooleanFromEnv(EnvironmentKey envKey)
      Resolve boolean value from environment only.