public final class ApplicationInfoBuilder
extends java.lang.Object
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();
Constructor and Description |
---|
ApplicationInfoBuilder()
Create an empty ApplicationInfoBuilder.
|
Modifier and Type | Method and 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) |
public ApplicationInfoBuilder()
Components.applicationInfo()
public ApplicationInfoBuilder applicationId(java.lang.String applicationId)
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.
applicationId
- the application identifierpublic ApplicationInfoBuilder applicationVersion(java.lang.String applicationVersion)
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.
applicationVersion
- the application versionpublic ApplicationInfo createApplicationInfo()
public static ApplicationInfoBuilder fromApplicationInfo(ApplicationInfo info)