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 SummaryConstructorsModifierConstructorDescriptionprotectedCreate 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 SummaryModifier 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.boot.actuate.health.ReactiveHealthIndicatorgetHealth
- 
Constructor Details- 
AbstractReactiveHealthIndicatorprotected AbstractReactiveHealthIndicator()Create a newAbstractReactiveHealthIndicatorinstance with a defaulthealthCheckFailedMessage.- Since:
- 2.1.7
 
- 
AbstractReactiveHealthIndicatorCreate 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
 
- 
AbstractReactiveHealthIndicatorCreate 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- 
healthDescription copied from interface:ReactiveHealthIndicatorProvide the indicator of health.- Specified by:
- healthin interface- ReactiveHealthIndicator
- Returns:
- a Monothat provides theHealth
 
- 
doHealthCheckActual health check logic. If an error occurs in the pipeline, it will be handled automatically.- Parameters:
- builder- the- Health.Builderto report health status and details
- Returns:
- a Monothat provides theHealth
 
 
-