org.zodiac.actuate.health.AppReactiveHealthContributor Maven / Gradle / Ivy
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