Class ApplicationInfoBuilder
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:
- 4.1.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplicationId
(String applicationId) Sets a unique identifier representing the application where the LaunchDarkly SDK is running.applicationName
(String applicationName) Sets a human friendly name for the application in which the LaunchDarkly SDK is running.applicationVersion
(String version) Sets a unique identifier representing the version of the application where the LaunchDarkly SDK is running.applicationVersionName
(String versionName) Sets a human friendly name for the version of the application in which the LaunchDarkly SDK is running.Called internally by the SDK to create the configuration object.
-
Constructor Details
-
ApplicationInfoBuilder
public ApplicationInfoBuilder()Create an empty ApplicationInfoBuilder.- See Also:
-
-
Method Details
-
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
-
applicationName
Sets a human friendly name for the application in which 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:
applicationName
- the human friendly name- Returns:
- the builder
-
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:
version
- the application version- Returns:
- the builder
-
applicationVersionName
Sets a human friendly name for the version of the application in which 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:
versionName
- the human friendly version name- Returns:
- the builder
-
createApplicationInfo
Called internally by the SDK to create the configuration object.- Returns:
- the configuration object
-