Skip to content

Commit 975d3ad

Browse files
committed
update readme
Signed-off-by: christian.lutnik <[email protected]>
1 parent 28130ba commit 975d3ad

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,6 @@ public class MyProvider implements FeatureProvider {
317317
return () -> "My Provider";
318318
}
319319

320-
@Override
321-
@Deprecated
322-
public ProviderState getState() {
323-
// the state of a FeatureProvider is managed by the SDK
324-
}
325-
326320
@Override
327321
public void initialize(EvaluationContext evaluationContext) throws Exception {
328322
// start up your provider
@@ -369,12 +363,6 @@ class MyEventProvider extends EventProvider {
369363
return () -> "My Event Provider";
370364
}
371365

372-
@Override
373-
@Deprecated
374-
public ProviderState getState() {
375-
// the state of an EventProvider is managed by the SDK
376-
}
377-
378366
@Override
379367
public void initialize(EvaluationContext evaluationContext) throws Exception {
380368
// emit events when flags are changed in a hypothetical REST API
@@ -393,6 +381,13 @@ class MyEventProvider extends EventProvider {
393381
}
394382
```
395383

384+
Providers no longer need to manage their own state, this is done by the SDK itself. If desired, the state of a provider
385+
can be queried through the client that uses the provider.
386+
387+
```java
388+
OpenFeatureAPI.getInstance().getClient().getProviderState();
389+
```
390+
396391
> Built a new provider? [Let us know](https://github.com/open-feature/openfeature.dev/issues/new?assignees=&labels=provider&projects=&template=document-provider.yaml&title=%5BProvider%5D%3A+) so we can add it to the docs!
397392
398393
### Develop a hook

0 commit comments

Comments
 (0)