Class AbstractHealthIndicator<T>
java.lang.Object
io.micronaut.management.health.indicator.AbstractHealthIndicator<T>
- Type Parameters:
 T- The health indication type
- All Implemented Interfaces:
 Ordered,HealthIndicator
- Direct Known Subclasses:
 DiskSpaceIndicator
A base health indicator class to extend from that catches exceptions thrown from the
 getHealthInformation() method and updates the HealthResult with the exception information.
- Since:
 - 1.0
 - Author:
 - James Kleeh
 
- 
Field Summary
FieldsFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TProvides information (typically a Map) to be returned.protected HealthResultBuilds the whole health result.protected abstract StringgetName()Used to populate theHealthResult.voidsetExecutorService(ExecutorService executorService)  
- 
Field Details
- 
executorService
 - 
healthStatus
 
 - 
 - 
Constructor Details
- 
AbstractHealthIndicator
public AbstractHealthIndicator() 
 - 
 - 
Method Details
- 
setExecutorService
- Parameters:
 executorService- The executor service
 - 
getResult
- Specified by:
 getResultin interfaceHealthIndicator- Returns:
 - A publisher that returns a 
HealthResultthat provides the information necessary to build a response. 
 - 
getHealthInformation
Provides information (typically a Map) to be returned. Set thehealthStatusfield during execution, otherwiseHealthStatus.UNKNOWNwill be used.- Returns:
 - Any details to be included in the response.
 
 - 
getHealthResult
Builds the whole health result.- Returns:
 - The health result to provide to the indicator.
 
 - 
getName
Used to populate theHealthResult. Provides a key to go along with the health information.- Returns:
 - The name of the indicator
 
 
 -