Package 

Class RemoteConfigDocument


  • 
    public final class RemoteConfigDocument
    
                        

    A 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 returns null when 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.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Boolean isEmpty
    • Method Summary

      Modifier and Type Method Description
      final Boolean getIsEmpty()
      final Boolean getBoolean(String section, String key) Reads a boolean value, or null when absent or not a boolean.
      final Float getSampleRate(String section, String key) Reads a sample rate, or null when absent, not a number, or outside 0..100.
      final Long getLong(String section, String key) Reads an integral value, or null when absent or not a number.
      final Integer getPositiveInt(String section, String key) Reads a strictly positive int, or null when absent, not a number, or <= 0.
      final String getString(String section, String key) Reads a string value, or null when absent or not a string.
      final <E extends Enum<E>> E getEnum(String section, String key) Reads an enum constant by (case-insensitive) name, or null when absent or when the value names no constant of E — an unknown name falls back to the SDK default rather than failing.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getBoolean

         final Boolean getBoolean(String section, String key)

        Reads a boolean value, or null when 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 null when absent, not a number, or outside 0..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 null when 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 null when 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 null when 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 null when 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.