-
Notifications
You must be signed in to change notification settings - Fork 70
/
UnleashSubscriber.java
43 lines (27 loc) · 1.47 KB
/
UnleashSubscriber.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
package io.getunleash.event;
import io.getunleash.UnleashException;
import io.getunleash.metric.ClientMetrics;
import io.getunleash.metric.ClientRegistration;
import io.getunleash.repository.FeatureCollection;
import io.getunleash.repository.FeatureToggleResponse;
import io.getunleash.repository.ToggleCollection;
import org.slf4j.LoggerFactory;
public interface UnleashSubscriber {
default void onError(UnleashException unleashException) {
LoggerFactory.getLogger(UnleashSubscriber.class)
.warn(unleashException.getMessage(), unleashException);
}
default void on(UnleashEvent unleashEvent) {}
default void onReady(UnleashReady unleashReady) {}
default void toggleEvaluated(ToggleEvaluated toggleEvaluated) {}
default void togglesFetched(FeatureToggleResponse toggleResponse) {}
default void clientMetrics(ClientMetrics clientMetrics) {}
default void clientRegistered(ClientRegistration clientRegistration) {}
default void togglesBackedUp(ToggleCollection toggleCollection) {}
default void toggleBackupRestored(ToggleCollection toggleCollection) {}
default void togglesBootstrapped(ToggleCollection toggleCollection) {}
default void featuresBootstrapped(FeatureCollection featureCollection) {}
default void featuresBackedUp(FeatureCollection featureCollection) {}
default void featuresBackupRestored(FeatureCollection featureCollection) {}
default void impression(ImpressionEvent impressionEvent) {}
}