-
public final class RemoteConfigDocumentA parsed remote SDK configuration document, as served by the Kubesense collector on
GET /rum/api/v1/sdk-config.The document is a two-level JSON object: named sections (
"rum","sessionReplay","features", ...) holding scalar values. Every accessor is fail-safe and returnsnullwhen the section or key is missing, has the wrong JSON type, or holds an out-of-range value — the caller then simply does not call the corresponding configuration builder method, so the SDK default applies. A broken document can never take an app away from safe SDK defaults.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRemoteConfigDocument.Companion
-
Method Summary
Modifier and Type Method Description final BooleangetIsEmpty()final BooleangetBoolean(String section, String key)Reads a boolean value, or nullwhen absent or not a boolean.final FloatgetSampleRate(String section, String key)Reads a sample rate, or nullwhen absent, not a number, or outside0..100.final LonggetLong(String section, String key)Reads an integral value, or nullwhen absent or not a number.final IntegergetPositiveInt(String section, String key)Reads a strictly positive int, or nullwhen absent, not a number, or<= 0.final StringgetString(String section, String key)Reads a string value, or nullwhen absent or not a string.final <E extends Enum<E>> EgetEnum(String section, String key)Reads an enum constant by (case-insensitive) name, or nullwhen absent or when the value names no constant of E — an unknown name falls back to the SDK default rather than failing.-
-
Method Detail
-
getIsEmpty
final Boolean getIsEmpty()
-
getBoolean
final Boolean getBoolean(String section, String key)
Reads a boolean value, or
nullwhen absent or not a boolean.- Parameters:
section- the top level section name, e.g.key- the key within the section.
-
getSampleRate
final Float getSampleRate(String section, String key)
Reads a sample rate, or
nullwhen absent, not a number, or outside0..100.- Parameters:
section- the top level section name, e.g.key- the key within the section.
-
getLong
final Long getLong(String section, String key)
Reads an integral value, or
nullwhen absent or not a number.- Parameters:
section- the top level section name, e.g.key- the key within the section.
-
getPositiveInt
final Integer getPositiveInt(String section, String key)
Reads a strictly positive int, or
nullwhen absent, not a number, or<= 0.- Parameters:
section- the top level section name, e.g.key- the key within the section.
-
getString
final String getString(String section, String key)
Reads a string value, or
nullwhen absent or not a string.- Parameters:
section- the top level section name.key- the key within the section.
-
getEnum
final <E extends Enum<E>> E getEnum(String section, String key)
Reads an enum constant by (case-insensitive) name, or
nullwhen absent or when the value names no constant of E — an unknown name falls back to the SDK default rather than failing.- Parameters:
section- the top level section name.key- the key within the section.
-
-
-
-