Java SDK APi clarification #422
Replies: 1 comment 2 replies
-
EdgeFeatureHubConfig holds the url + api key for the connection. It will also automatically create you a ClientFeatureRepository and JerseyClient (because you included the dependency) when you go newContext(). However you can create these yourself if you wish and set them on EdgeFeatureHubClient (by calling .repository() and .edgeProvider() - you may wish to do this for JerseyClient for example, because you need to pass extra parameters to control it. If you ask for your features via the repository all you get are the "default values", you need to pass a ClientContext if you wish to use the rollout strategies (as per https://docs.featurehub.io/#_rollout_strategies_and_targeting_rules ). You also want to be careful of whether you are using Client or Server evaluated keys - with the Jersey client you want to use Client keys unless there is only 1 user using your application. They are documented here: https://docs.featurehub.io/#_client_and_server_api_keys |
Beta Was this translation helpful? Give feedback.
-
what is the use of EdgeFeatureHubConfig, ClientContext?
for now , i am using JerseyClient and ClientFeatureRepository directly in every places where i need flags.
Is ClientFeatureRepository can be singleton or everytime i need to create object for ClientFeatureRepository ?
Beta Was this translation helpful? Give feedback.
All reactions