Interface IDevCycleClient
-
- All Known Implementing Classes:
DevCycleCloudClient,DevCycleLocalClient
public interface IDevCycleClientBase interface for DevCycle clients that can be used to evaluate Features and retrieve variables values.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close the client and release any resources.dev.openfeature.sdk.FeatureProvidergetOpenFeatureProvider()java.lang.StringgetSDKPlatform()booleanisInitialized()<T> Variable<T>variable(DevCycleUser user, java.lang.String key, T defaultValue)<T> TvariableValue(DevCycleUser user, java.lang.String key, T defaultValue)
-
-
-
Method Detail
-
isInitialized
boolean isInitialized()
- Returns:
- true if the client is initialized and ready to be used. Clients should return a default value if they are not initialized.
-
variableValue
<T> T variableValue(DevCycleUser user, java.lang.String key, T defaultValue)
- Parameters:
user- (required) The user context for the evaluation.key- (required) The key of the feature variable to evaluate.defaultValue- (required) The default value to return if the feature variable is not found or the user does not segment into the feature- Returns:
- the value of the variable for the given user, or the default value if the variable is not found.
-
variable
<T> Variable<T> variable(DevCycleUser user, java.lang.String key, T defaultValue)
- Parameters:
user- (required) The user context for the evaluation.key- (required) The key of the feature variable to evaluate.defaultValue- (required) The default value to return if the feature variable is not found or the user does not segment into the feature- Returns:
- the variable for the given user, or the default variable if the variable is not found.
-
close
void close()
Close the client and release any resources.
-
getOpenFeatureProvider
dev.openfeature.sdk.FeatureProvider getOpenFeatureProvider()
- Returns:
- the OpenFeature provider for this client.
-
getSDKPlatform
java.lang.String getSDKPlatform()
-
-