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

org.zodiac.actuate.health.AppReactiveHealthContributor Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.actuate.health;

import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.util.Assert;

public interface AppReactiveHealthContributor {

    static AppReactiveHealthContributor adapt(AppHealthContributor healthContributor) {
        Assert.notNull(healthContributor, "HealthContributor must not be null");
        if (healthContributor instanceof HealthIndicator) {
            return new AppHealthIndicatorReactiveAdapter((HealthIndicator)healthContributor);
        }
        if (healthContributor instanceof AppCompositeHealthContributor) {
            return new AppCompositeHealthContributorReactiveAdapter((AppCompositeHealthContributor)healthContributor);
        }
        throw new IllegalStateException("Unknown HealthContributor type");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy