Package app.l2nx.gs.adapter.core.config
Class ConfigResolver
java.lang.Object
app.l2nx.gs.adapter.core.config.ConfigResolver
Resolves adapter configuration from a two-source chain (per key), file-first:
- Properties file — either the path given by
-Dl2nx.config-file=<path>(operator-preferred; absolute or relative to the JVM working directory), orl2nx.propertiesin the JVM working directory of the host application as a fallback whenl2nx.config-fileis unset. - JVM system property (e.g.
-Dl2nx.gs-key=...) — consulted only when the file does not provide the key.
Missing-file semantics:
-Dl2nx.config-fileexplicitly set but missing / unreadable / malformed path → fail loud withIllegalStateException; the operator's intent is clear.-Dl2nx.config-fileunset andl2nx.propertiesnot present in the JVM working directory → emptyProperties(graceful — sysprop fallback may still provide the keys).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolve()booleanresolveBoolean(String key, boolean defaultValue) booleanresolveString(String key)
-
Constructor Details
-
ConfigResolver
public ConfigResolver()
-
-
Method Details
-
resolve
-
resolveEventsConfig
-
resolveCommandsConfig
-
resolveString
-
resolveBoolean
-
resolveServerKey
-
resolvePlatformUrl
-
resolveEnabled
public boolean resolveEnabled() -
resolveAdapterVersion
-