Class ApplicationInfoBuilder


  • public final class ApplicationInfoBuilder
    extends java.lang.Object
    Contains methods for configuring the SDK's application metadata.

    Application metadata may be used in LaunchDarkly analytics or other product features, but does not affect feature flag evaluations.

    If you want to set non-default values for any of these fields, create a builder with Components.applicationInfo(), change its properties with the methods of this class, and pass it to LDConfig.Builder.applicationInfo(ApplicationInfoBuilder):

    
         LDConfig config = new LDConfig.Builder()
             .applicationInfo(
                 Components.applicationInfo()
                     .applicationId("authentication-service")
                     .applicationVersion("1.0.0")
             )
             .build();
     

    Since:
    5.8.0
    • Constructor Detail

    • Method Detail

      • applicationId

        public ApplicationInfoBuilder applicationId​(java.lang.String applicationId)
        Sets a unique identifier representing the application where the LaunchDarkly SDK is running.

        This can be specified as any string value as long as it only uses the following characters: ASCII letters, ASCII digits, period, hyphen, underscore. A string containing any other characters will be ignored.

        Parameters:
        applicationId - the application identifier
        Returns:
        the builder
      • applicationVersion

        public ApplicationInfoBuilder applicationVersion​(java.lang.String applicationVersion)
        Sets a unique identifier representing the version of the application where the LaunchDarkly SDK is running.

        This can be specified as any string value as long as it only uses the following characters: ASCII letters, ASCII digits, period, hyphen, underscore. A string containing any other characters will be ignored.

        Parameters:
        applicationVersion - the application version
        Returns:
        the builder
      • createApplicationInfo

        public ApplicationInfo createApplicationInfo()
        Called internally by the SDK to create the configuration object.
        Returns:
        the configuration object