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
-
Constructor Summary
ModifierConstructorDescriptionprotected
Create a newAbstractReactiveHealthIndicator
instance with a defaulthealthCheckFailedMessage
.protected
AbstractReactiveHealthIndicator
(String healthCheckFailedMessage) Create a newAbstractReactiveHealthIndicator
instance with a specific message to log when the health check fails.protected
AbstractReactiveHealthIndicator
(Function<Throwable, String> healthCheckFailedMessage) Create a newAbstractReactiveHealthIndicator
instance 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, wait
Methods inherited from interface org.springframework.boot.actuate.health.ReactiveHealthIndicator
getHealth
-
Constructor Details
-
AbstractReactiveHealthIndicator
protected AbstractReactiveHealthIndicator()Create a newAbstractReactiveHealthIndicator
instance with a defaulthealthCheckFailedMessage
.- Since:
- 2.1.7
-
AbstractReactiveHealthIndicator
Create a newAbstractReactiveHealthIndicator
instance 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 newAbstractReactiveHealthIndicator
instance 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:ReactiveHealthIndicator
Provide the indicator of health.- Specified by:
health
in interfaceReactiveHealthIndicator
- Returns:
- a
Mono
that provides theHealth
-
doHealthCheck
Actual health check logic. If an error occurs in the pipeline it will be handled automatically.- Parameters:
builder
- theHealth.Builder
to report health status and details- Returns:
- a
Mono
that provides theHealth
-