Class RuntimeConfig
UI actions update this state, and runtime exporters read from it. The export-running flag gates whether traffic (and future sources) are actually sent to sinks; Start/Stop in the UI toggle this without changing saved config.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns a human-readable summary of the currently enabled export destinations.static booleanDisables only the OpenSearch destination in the current runtime state.static intConfigured destination-volume used-percent threshold for file export.static StringReturns the configured file export root, or blank when unset.static longConfigured total cap across exporter files under the selected root.getAllowedExportKeys(String indexShortName) Returns the set of top-level field keys allowed for export for the given index.static ConfigState.StategetState()Returns the current runtime config state.static booleanReturns whether any runtime file export format is enabled and a root path is set.static booleanTrue when any export sink is enabled and sufficiently configured to accept documents.static booleanTrue when traffic export has at least one destination sink enabled.static booleanReturns whether export is fully active and allowed to emit runtime documents.static booleanReturns whether export is currently running (Start pressed).static booleanReturns whether bulk-compatible NDJSON export is enabled.static booleanTrue when the optional destination-volume used-percent threshold is enabled.static booleanReturns whether document-only JSONL export is enabled.static booleanTrue when the total exporter-file cap is enabled.static booleanTrue when OpenSearch export is enabled and a non-blank runtime URL is available.static booleanTrue when OpenSearch export is enabled for the traffic source and at least one tool type is selected.Returns the configured LogPanel preferences.static StringOptional OpenSearch password for basic auth (empty = no auth).static StringCurrent OpenSearch TLS mode.static StringCurrent OpenSearch URL for runtime exports; blank when OpenSearch export is disabled.static StringOptional OpenSearch username for basic auth (empty = no auth).static voidRegisters a listener for runtime-state changes and immediately replays the current state.static voidsetExportRunning(boolean running) Sets the export-running flag.static voidsetExportStarting(boolean starting) Sets whether export startup/bootstrap is still in progress.static intReturns the configured StatsPanel chart style in the range 1-3.static ConfigState.UiPreferencesReturns the persisted UI preferences currently attached to runtime config.static voidRemoves a previously registered runtime-state listener.static voidupdateLogPanelPreferences(ConfigState.LogPanelPreferences logPanelPreferences) Updates only the persisted LogPanel preferences while preserving all other runtime config.static voidupdateState(ConfigState.State newState) Updates the runtime config state with a normalized, non-null value.static voidupdateStatsChartStyle(int chartStyle) Updates only the persisted StatsPanel chart style while preserving all other runtime config.
-
Method Details
-
getState
Returns the current runtime config state. -
isExportRunning
public static boolean isExportRunning()Returns whether export is currently running (Start pressed).When
false, traffic and other exporters do not send data to sinks.- Returns:
trueif export has been started and not stopped
-
isExportReady
public static boolean isExportReady()Returns whether export is fully active and allowed to emit runtime documents.This stays
falseduring Start/bootstrap work so background listeners do not begin pushing traffic or tool-log documents before OpenSearch preflight and index bootstrap have succeeded. -
setExportRunning
public static void setExportRunning(boolean running) Sets the export-running flag.Start button sets
true; Stop button setsfalse.- Parameters:
running- new running state
-
setExportStarting
public static void setExportStarting(boolean starting) Sets whether export startup/bootstrap is still in progress.When
true, the UI may show a running state while runtime exporters remain gated until startup succeeds. -
updateState
Updates the runtime config state with a normalized, non-null value. -
disableOpenSearchDestination
public static boolean disableOpenSearchDestination()Disables only the OpenSearch destination in the current runtime state.This is used for runtime shutdown of a failing destination while allowing any configured file export destination to continue. Later UI changes can intentionally re-enable OpenSearch by pushing a fresh runtime state from the current form values.
- Returns:
truewhen OpenSearch was enabled and is now disabled;falseotherwise
-
registerStateListener
Registers a listener for runtime-state changes and immediately replays the current state. -
unregisterStateListener
Removes a previously registered runtime-state listener. -
isOpenSearchExportEnabled
public static boolean isOpenSearchExportEnabled()True when OpenSearch export is enabled and a non-blank runtime URL is available. -
isOpenSearchTrafficEnabled
public static boolean isOpenSearchTrafficEnabled()True when OpenSearch export is enabled for the traffic source and at least one tool type is selected. -
isAnySinkEnabled
public static boolean isAnySinkEnabled()True when any export sink is enabled and sufficiently configured to accept documents. -
activeSinkSummary
Returns a human-readable summary of the currently enabled export destinations.The result is intended for UI and log messages such as start/stop status updates. It reflects the current runtime sink selection and returns
"no destinations"when neither Files nor OpenSearch is enabled.- Returns:
- destination summary suitable for operator-facing status text
-
isAnyTrafficExportEnabled
public static boolean isAnyTrafficExportEnabled()True when traffic export has at least one destination sink enabled. -
openSearchUrl
Current OpenSearch URL for runtime exports; blank when OpenSearch export is disabled. -
openSearchUser
Optional OpenSearch username for basic auth (empty = no auth). -
openSearchPassword
Optional OpenSearch password for basic auth (empty = no auth). -
openSearchTlsMode
Current OpenSearch TLS mode. -
uiPreferences
Returns the persisted UI preferences currently attached to runtime config. -
statsChartStyle
public static int statsChartStyle()Returns the configured StatsPanel chart style in the range 1-3. -
logPanelPreferences
Returns the configured LogPanel preferences. -
updateStatsChartStyle
public static void updateStatsChartStyle(int chartStyle) Updates only the persisted StatsPanel chart style while preserving all other runtime config. -
updateLogPanelPreferences
Updates only the persisted LogPanel preferences while preserving all other runtime config. -
getAllowedExportKeys
Returns the set of top-level field keys allowed for export for the given index. Used for document filtering (which fields to include in pushed documents). When no field selection is saved, returns required + all toggleable fields. -
isAnyFileExportEnabled
public static boolean isAnyFileExportEnabled()Returns whether any runtime file export format is enabled and a root path is set. -
isFileJsonlEnabled
public static boolean isFileJsonlEnabled()Returns whether document-only JSONL export is enabled. -
isFileBulkNdjsonEnabled
public static boolean isFileBulkNdjsonEnabled()Returns whether bulk-compatible NDJSON export is enabled. -
fileExportRoot
Returns the configured file export root, or blank when unset. -
isFileTotalCapEnabled
public static boolean isFileTotalCapEnabled()True when the total exporter-file cap is enabled. -
fileTotalCapBytes
public static long fileTotalCapBytes()Configured total cap across exporter files under the selected root. -
isFileDiskUsagePercentEnabled
public static boolean isFileDiskUsagePercentEnabled()True when the optional destination-volume used-percent threshold is enabled. -
fileDiskUsagePercent
public static int fileDiskUsagePercent()Configured destination-volume used-percent threshold for file export.
-