All Downloads are FREE. Search and download functionalities are using the official Maven repository.

no.finn.unleash.event.UnleashSubscriber Maven / Gradle / Ivy

There is a newer version: 4.4.1
Show newest version
package no.finn.unleash.event;

import no.finn.unleash.UnleashException;
import no.finn.unleash.metric.ClientMetrics;
import no.finn.unleash.metric.ClientRegistration;
import no.finn.unleash.repository.FeatureToggleResponse;
import no.finn.unleash.repository.ToggleCollection;
import org.apache.logging.log4j.LogManager;

public interface UnleashSubscriber {

    default void onError(UnleashException unleashException) {
        LogManager.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) { }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy