Class ApplicationInfoBuilder
- java.lang.Object
-
- com.launchdarkly.sdk.server.integrations.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 toLDConfig.Builder.applicationInfo(ApplicationInfoBuilder)
:LDConfig config = new LDConfig.Builder() .applicationInfo( Components.applicationInfo() .applicationId("authentication-service") .applicationVersion("1.0.0") ) .build();
- Since:
- 5.8.0
-
-
Constructor Summary
Constructors Constructor Description ApplicationInfoBuilder()
Create an empty ApplicationInfoBuilder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationInfoBuilder
applicationId(java.lang.String applicationId)
Sets a unique identifier representing the application where the LaunchDarkly SDK is running.ApplicationInfoBuilder
applicationVersion(java.lang.String applicationVersion)
Sets a unique identifier representing the version of the application where the LaunchDarkly SDK is running.ApplicationInfo
createApplicationInfo()
Called internally by the SDK to create the configuration object.static ApplicationInfoBuilder
fromApplicationInfo(ApplicationInfo info)
-
-
-
Constructor Detail
-
ApplicationInfoBuilder
public ApplicationInfoBuilder()
Create an empty ApplicationInfoBuilder.- See Also:
Components.applicationInfo()
-
-
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
-
fromApplicationInfo
public static ApplicationInfoBuilder fromApplicationInfo(ApplicationInfo info)
-
-