Class AbstractReactiveHealthIndicator
java.lang.Object
org.springframework.boot.actuate.health.AbstractReactiveHealthIndicator
- All Implemented Interfaces:
ReactiveHealthContributor,ReactiveHealthIndicator
- Direct Known Subclasses:
CassandraDriverReactiveHealthIndicator,ConnectionFactoryHealthIndicator,CouchbaseReactiveHealthIndicator,ElasticsearchReactiveHealthIndicator,MongoReactiveHealthIndicator,Neo4jReactiveHealthIndicator,RedisReactiveHealthIndicator
public abstract class AbstractReactiveHealthIndicator
extends Object
implements ReactiveHealthIndicator
Base
ReactiveHealthIndicator implementations that encapsulates creation of
Health instance and error handling.- Since:
- 2.0.0
- Author:
- Stephane Nicoll, Nikolay Rybak, Moritz Halbritter
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate a newAbstractReactiveHealthIndicatorinstance with a defaulthealthCheckFailedMessage.protectedAbstractReactiveHealthIndicator(String healthCheckFailedMessage) Create a newAbstractReactiveHealthIndicatorinstance with a specific message to log when the health check fails.protectedAbstractReactiveHealthIndicator(Function<Throwable, String> healthCheckFailedMessage) Create a newAbstractReactiveHealthIndicatorinstance with a specific message to log when the health check fails. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract reactor.core.publisher.Mono<Health>doHealthCheck(Health.Builder builder) Actual health check logic.final reactor.core.publisher.Mono<Health>health()Provide the indicator of health.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.boot.actuate.health.ReactiveHealthIndicator
getHealth
-
Constructor Details
-
AbstractReactiveHealthIndicator
protected AbstractReactiveHealthIndicator()Create a newAbstractReactiveHealthIndicatorinstance with a defaulthealthCheckFailedMessage.- Since:
- 2.1.7
-
AbstractReactiveHealthIndicator
Create a newAbstractReactiveHealthIndicatorinstance with a specific message to log when the health check fails.- Parameters:
healthCheckFailedMessage- the message to log on health check failure- Since:
- 2.1.7
-
AbstractReactiveHealthIndicator
Create a newAbstractReactiveHealthIndicatorinstance with a specific message to log when the health check fails.- Parameters:
healthCheckFailedMessage- the message to log on health check failure- Since:
- 2.1.7
-
-
Method Details
-
health
Description copied from interface:ReactiveHealthIndicatorProvide the indicator of health.- Specified by:
healthin interfaceReactiveHealthIndicator- Returns:
- a
Monothat provides theHealth
-
doHealthCheck
Actual health check logic. If an error occurs in the pipeline, it will be handled automatically.- Parameters:
builder- theHealth.Builderto report health status and details- Returns:
- a
Monothat provides theHealth
-