Package co.featbit.server
Class FBConfig.Builder
java.lang.Object
co.featbit.server.FBConfig.Builder
- Enclosing class:
- FBConfig
Builder to create advanced configuration options, calls can be chained.
FBConfig config = new FBConfig.Builder()
.streamingURL("your streaming URI")
.eventURL("your event URI")
.startWaitTime(Duration.ZERO)
.offline(false)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configuredFBConfigdataStorageFactory(DataStorageFactory dataStorageFactory) Sets the implementation of the data storage to be used for holding feature flags and related data received from LaunchDarkly, using a factory object.dataSynchronizerFactory(DataSynchronizerFactory dataSynchronizerFactory) Sets the implementation of theDataSynchronizerthat receives feature flag data from feature flag center, using a factory object.URL of your feature management platform to send analytics eventshttpConfigFactory(HttpConfigFactory httpConfigFactory) Sets the SDK's networking configuration, using a factory object.insightProcessorFactory(InsightProcessorFactory insightProcessorFactory) Sets the implementation ofInsightProcessorto be used for processing analytics events, using a factory object.offline(boolean offline) Set whether SDK is offline.startWaitTime(Duration startWaitTime) Set how long the constructor will block awaiting a successful data sync.streamingURL(String streamingURL) URL of your feature management platform to synchronise feature flags, user segments, etc.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
dataStorageFactory
Sets the implementation of the data storage to be used for holding feature flags and related data received from LaunchDarkly, using a factory object. The default isFactory.inMemoryDataStorageFactory()- Parameters:
dataStorageFactory- aDataStorageFactoryinstance- Returns:
- the builder
-
dataSynchronizerFactory
Sets the implementation of theDataSynchronizerthat receives feature flag data from feature flag center, using a factory object. Depending on the implementation, the factory may be a builder that allows you to set other configuration options as well. The default isFactory.dataSynchronizerFactory()- Parameters:
dataSynchronizerFactory- anDataSynchronizerFactoryinstance- Returns:
- the builder
-
httpConfigFactory
Sets the SDK's networking configuration, using a factory object. Depending on the implementation, the factory may be a builder that allows you to set other configuration options as well. This object by default is a configuration builder obtained fromFactory.httpConfigFactory(),- Parameters:
httpConfigFactory- aHttpConfigFactory- Returns:
- the builder
-
insightProcessorFactory
Sets the implementation ofInsightProcessorto be used for processing analytics events, using a factory object. Depending on the implementation, the factory may be a builder that allows you to set other configuration options as well. The default isFactory.insightProcessorFactory()- Parameters:
insightProcessorFactory- anInsightProcessorFactory- Returns:
- the builder
-
offline
Set whether SDK is offline.- Parameters:
offline- when set to true no connection to feature flag center- Returns:
- the builder
-
startWaitTime
Set how long the constructor will block awaiting a successful data sync. Setting this to a zero or negative duration will not block and cause the constructor to return immediately.- Parameters:
startWaitTime- maximum time to wait; null to use the default- Returns:
- the builder
-
streamingURL
URL of your feature management platform to synchronise feature flags, user segments, etc.- Parameters:
streamingURL- streaming url- Returns:
- the builder
-
eventURL
URL of your feature management platform to send analytics events- Parameters:
eventURL- event url- Returns:
- the builder
-
build
Builds the configuredFBConfig- Returns:
- a
FBConfiginstance
-