Class ConfigController
Each async method runs work on a SwingWorker background thread and marshals UI updates to
the EDT via the ConfigController.Ui callbacks. Callers may invoke methods from any thread.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceUI callback surface implemented by ConfigPanel. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexportConfigAsync(Path out, String json) Writes the provided config JSON to disk asynchronously.voidReads and parses a configuration file asynchronously.voidTests connectivity to an OpenSearch cluster asynchronously.
-
Constructor Details
-
ConfigController
-
-
Method Details
-
exportConfigAsync
Writes the provided config JSON to disk asynchronously.Work is performed on a background thread; status is published to
ConfigController.Ui.onControlStatus(java.lang.String)on the EDT.- Parameters:
out- destination path (will be created with parent directories)json- serialized configuration payload
-
importConfigAsync
Reads and parses a configuration file asynchronously.On success, forwards the parsed state to the UI on the EDT and reports status through
ConfigController.Ui.onControlStatus(java.lang.String). Errors are surfaced as status strings.- Parameters:
in- config file to load
-
testConnectionAsync
Tests connectivity to an OpenSearch cluster asynchronously.The result message is sent to
ConfigController.Ui.onOpenSearchStatus(java.lang.String)on the EDT. Uses current RuntimeConfig for credentials and insecure-SSL (caller should call updateRuntimeConfig / buildCurrentState before this so the checkbox and current session auth apply).- Parameters:
url- base URL of the OpenSearch cluster
-