Class DevCycleCloudClient
java.lang.Object
com.devcycle.sdk.server.cloud.api.DevCycleCloudClient
- All Implemented Interfaces:
IDevCycleClient
-
Constructor Summary
ConstructorsConstructorDescriptionDevCycleCloudClient(String sdkKey) DevCycleCloudClient(String sdkKey, DevCycleCloudOptions options) -
Method Summary
Modifier and TypeMethodDescriptionallFeatures(DevCycleUser user) Get all features for user dataallVariables(DevCycleUser user) Get all variables by key for user datavoidclose()Close the client and release any resources.dev.openfeature.sdk.FeatureProviderbooleanvoidtrack(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
-
DevCycleCloudClient
-
DevCycleCloudClient
-
-
Method Details
-
allFeatures
Get all features for user data- Parameters:
user- (required)- Returns:
- Map>String, Feature<
- Throws:
DevCycleException
-
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfaceIDevCycleClient- Returns:
- true if the client is initialized and ready to be used. Clients should return a default value if they are not initialized.
-
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
- Throws:
IllegalArgumentException- If there are any issues with the key or default value provided
-
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
- Throws:
IllegalArgumentException- If there are any issues with the key or default value provided
-
close
public void close()Description copied from interface:IDevCycleClientClose the client and release any resources.- Specified by:
closein interfaceIDevCycleClient
-
getOpenFeatureProvider
public dev.openfeature.sdk.FeatureProvider getOpenFeatureProvider()- Specified by:
getOpenFeatureProviderin interfaceIDevCycleClient- Returns:
- the OpenFeature provider for this client.
-
getSDKPlatform
- Specified by:
getSDKPlatformin interfaceIDevCycleClient
-
allVariables
Get all variables by key for user data- Parameters:
user- (required)- Returns:
- Map>String, BaseVariable<
- Throws:
DevCycleException
-
track
Post events to DevCycle for user- Parameters:
user- (required)event- (required)- Throws:
DevCycleException
-