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) fallbackStrategy(Strategy fallbackStrategy) fetchTogglesConnectTimeout(Duration connectTimeout) fetchTogglesConnectTimeoutSeconds(long connectTimeoutSeconds) fetchTogglesInterval(long fetchTogglesInterval) fetchTogglesReadTimeout(Duration readTimeout) fetchTogglesReadTimeoutSeconds(long readTimeoutSeconds) 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
-
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 -
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.
-
build
-
getDefaultSdkVersion
-