File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed
features/dd-sdk-android-flags/src
main/kotlin/com/datadog/android/flags
test/kotlin/com/datadog/android/flags Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
4+ * Copyright 2016-Present Datadog, Inc.
5+ */
6+
7+ package com.datadog.android.flags
8+
9+ /* *
10+ * Callback interface for asynchronous evaluation context update operations.
11+ *
12+ * This callback is invoked on a background thread after the [FlagsClient.setEvaluationContext]
13+ * operation completes. The callback is guaranteed to be invoked after the corresponding
14+ * [FlagsClientState] transition.
15+ */
16+ interface EvaluationContextCallback {
17+ /* *
18+ * Invoked when the evaluation context update completes successfully.
19+ *
20+ * This method is called on a background executor thread after the state transitions
21+ * to [FlagsClientState.Ready]. The new flag evaluations are now available for
22+ * subsequent flag resolution calls.
23+ */
24+ fun onSuccess ()
25+
26+ /* *
27+ * Invoked when the evaluation context update fails.
28+ *
29+ * This method is called on a background executor thread after the state transitions
30+ * to either [FlagsClientState.Stale] (network failed but cached flags available) or
31+ * [FlagsClientState.Error] (network failed with no cached flags).
32+ *
33+ * @param error A [Throwable] containing details about the failure, typically including
34+ * a message explaining the network request failure.
35+ */
36+ fun onFailure (error : Throwable )
37+ }
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ import org.mockito.Mock
2525import org.mockito.junit.jupiter.MockitoExtension
2626import org.mockito.junit.jupiter.MockitoSettings
2727import org.mockito.kotlin.argThat
28- import org.mockito.kotlin.argumentCaptor
2928import org.mockito.kotlin.eq
3029import org.mockito.kotlin.mock
3130import org.mockito.kotlin.verify
You can’t perform that action at this time.
0 commit comments