Package io.getunleash.util
Class UnleashConfig.Builder
java.lang.Object
io.getunleash.util.UnleashConfig.Builder
- Enclosing class:
- UnleashConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a custom http header for authorizing the clientbackupFile(String backupFile) build()customHttpHeader(String name, String value) Don't send metrics to Unleash serverDon't poll for feature toggle updatesenvironment(String environment) Deprecated, for removal: This API element is subject to removal in a future version.Environment is a first class citizen in Unleash 4.0.0 and later.fallbackStrategy(Strategy fallbackStrategy) fetchTogglesConnectTimeout(Duration connectTimeout) fetchTogglesConnectTimeoutSeconds(long connectTimeoutSeconds) fetchTogglesInterval(long fetchTogglesInterval) fetchTogglesReadTimeout(Duration readTimeout) fetchTogglesReadTimeoutSeconds(long readTimeoutSeconds) impactMetricsRegistry(ImpactMetricRegistryAndDataSource impactMetricsRegistry) instanceId(String instanceId) metricsSenderFactory(MetricSenderFactory metricSenderFactory) namePrefix(String namePrefix) projectName(String projectName) scheduledExecutor(UnleashScheduledExecutor scheduledExecutor) sendMetricsConnectTimeout(Duration connectTimeout) sendMetricsConnectTimeoutSeconds(long connectTimeoutSeconds) sendMetricsInterval(long sendMetricsInterval) sendMetricsReadTimeout(Duration readTimeout) sendMetricsReadTimeoutSeconds(long readTimeoutSeconds) startupExceptionHandler(Consumer<UnleashException> startupExceptionHandler) Used to handle exceptions when starting up synchronously.subscriber(UnleashSubscriber unleashSubscriber) synchronousFetchOnInitialisation(boolean enable) toggleBootstrapProvider(ToggleBootstrapProvider toggleBootstrapProvider) unleashAPI(String unleashAPI) unleashAPI(URI unleashAPI) unleashContextProvider(UnleashContextProvider contextProvider) unleashFeatureFetcherFactory(UnleashFeatureFetcherFactory unleashFeatureFetcherFactory)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
unleashAPI
-
unleashAPI
-
customHttpHeader
-
customHttpHeadersProvider
-
appName
-
environment
@Deprecated(since="12.0.0", forRemoval=true) public UnleashConfig.Builder environment(String environment) Deprecated, for removal: This API element is subject to removal in a future version.Environment is a first class citizen in Unleash 4.0.0 and later. From v13.0.0 of the Java SDK, this will be computed from the API key provided instead of being manually set. -
instanceId
-
projectName
-
namePrefix
-
unleashFeatureFetcherFactory
public UnleashConfig.Builder unleashFeatureFetcherFactory(UnleashFeatureFetcherFactory unleashFeatureFetcherFactory) -
metricsSenderFactory
-
fetchTogglesInterval
-
fetchTogglesConnectTimeout
-
fetchTogglesConnectTimeoutSeconds
-
fetchTogglesReadTimeout
-
fetchTogglesReadTimeoutSeconds
-
sendMetricsInterval
-
disablePolling
Don't poll for feature toggle updates -
experimentalStreamingMode
-
sendMetricsConnectTimeout
-
sendMetricsConnectTimeoutSeconds
-
sendMetricsReadTimeout
-
sendMetricsReadTimeoutSeconds
-
disableMetrics
Don't send metrics to Unleash server- Returns:
-
backupFile
-
enableProxyAuthenticationByJvmProperties
-
unleashContextProvider
-
synchronousFetchOnInitialisation
-
scheduledExecutor
-
subscriber
-
fallbackStrategy
-
toggleBootstrapProvider
public UnleashConfig.Builder toggleBootstrapProvider(@Nullable ToggleBootstrapProvider toggleBootstrapProvider) -
proxy
-
proxy
-
apiKey
Adds a custom http header for authorizing the client- Parameters:
apiKey- the client key to use to connect to the Unleash Server- Returns:
-
startupExceptionHandler
public UnleashConfig.Builder startupExceptionHandler(@Nullable Consumer<UnleashException> startupExceptionHandler) Used to handle exceptions when starting up synchronously. Allows user the option to choose how errors should be handled.- Parameters:
startupExceptionHandler- - a lambda taking the Exception and doing what it wants to the system.
-
impactMetricsRegistry
public UnleashConfig.Builder impactMetricsRegistry(@Nullable ImpactMetricRegistryAndDataSource impactMetricsRegistry) -
build
-
getDefaultSdkVersion
-