forked from open-feature/java-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClient.java
36 lines (30 loc) · 916 Bytes
/
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
package dev.openfeature.sdk;
import java.util.List;
/**
* Interface used to resolve flags of varying types.
*/
public interface Client extends Features, EventBus<Client> {
Metadata 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();
}