forked from open-feature/java-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClient.java
46 lines (39 loc) · 1.08 KB
/
Client.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package dev.openfeature.sdk;
import java.util.List;
/**
* Interface used to resolve flags of varying types.
*/
public interface Client extends Features, Tracking, EventBus<Client> {
ClientMetadata getMetadata();
/**
* Return an optional client-level evaluation context.
*
* @return {@link EvaluationContext}
*/
EvaluationContext getEvaluationContext();
/**
* Set the client-level evaluation context.
*
* @param ctx Client level context.
*/
Client setEvaluationContext(EvaluationContext ctx);
/**
* Adds hooks for evaluation.
* Hooks are run in the order they're added in the before stage. They are run in reverse order for all other stages.
*
* @param hooks The hook to add.
*/
Client addHooks(Hook... hooks);
/**
* Fetch the hooks associated to this client.
*
* @return A list of {@link Hook}s.
*/
List<Hook> getHooks();
/**
* Returns the current state of the associated provider.
*
* @return the provider state
*/
ProviderState getProviderState();
}