Class DevCycleLocalClient
java.lang.Object
com.devcycle.sdk.server.local.api.DevCycleLocalClient
- All Implemented Interfaces:
IDevCycleClient
-
Constructor Summary
ConstructorsConstructorDescriptionDevCycleLocalClient(String sdkKey) DevCycleLocalClient(String sdkKey, DevCycleLocalOptions dvcOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an evaluation hook to the clientallFeatures(DevCycleUser user) Get all features for user dataallVariables(DevCycleUser user) Get all variables by key for user datavoidRemove all evaluation hooks from the clientvoidclose()Gracefully close the clientdev.openfeature.sdk.FeatureProviderbooleanvoidsetClientCustomData(Map<String, Object> customData) voidtrack(DevCycleUser user, DevCycleEvent event) Post events to DevCycle for user<T> Variable<T>variable(DevCycleUser user, String key, T defaultValue) Get variable by key for user data<T> TvariableValue(DevCycleUser user, String key, T defaultValue) Get variable value by key for user data
-
Constructor Details
-
DevCycleLocalClient
-
DevCycleLocalClient
-
-
Method Details
-
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfaceIDevCycleClient- Returns:
- true if the DevCycleLocalClient is fully initialized and has successfully loaded a configuration
-
allFeatures
Get all features for user data- Parameters:
user- (required)
-
variableValue
Get variable value by key for user data- Specified by:
variableValuein interfaceIDevCycleClient- Parameters:
user- (required)key- Feature key (required)defaultValue- Default value to use if the variable could not be fetched (required)- Returns:
- Variable value
-
variable
Get variable by key for user data- Specified by:
variablein interfaceIDevCycleClient- Parameters:
user- (required)key- Variable key (required)defaultValue- Default value to use if the variable could not be fetched (required)- Returns:
- Variable
-
getMetadata
-
allVariables
Get all variables by key for user data- Parameters:
user- (required)
-
track
Post events to DevCycle for user- Specified by:
trackin interfaceIDevCycleClient- Parameters:
user- (required)event- (required)
-
setClientCustomData
-
close
public void close()Gracefully close the client- Specified by:
closein interfaceIDevCycleClient
-
addHook
Add an evaluation hook to the client- Parameters:
hook- The hook to add
-
clearHooks
public void clearHooks()Remove all evaluation hooks from the client -
getOpenFeatureProvider
public dev.openfeature.sdk.FeatureProvider getOpenFeatureProvider()- Specified by:
getOpenFeatureProviderin interfaceIDevCycleClient- Returns:
- the OpenFeature provider for this client.
-
getSDKPlatform
- Specified by:
getSDKPlatformin interfaceIDevCycleClient
-