@Singleton @Requires(beans=HealthEndpoint.class) public class RxJavaHealthAggregator extends java.lang.Object implements HealthAggregator<HealthResult>
Default implementation of HealthAggregator that creates a {status: , description: (optional) , details: }
response. The top level object represents the most severe status found in the provided health results, or
HealthStatus.UNKNOWN if none found. All registered indicators have their own
{status: , description: (optional , details: } object, keyed by the name of the HealthResult defined inside
of the details of the top level object.
Example: [status: "UP, details: [diskSpace: [status: UP, details: [:]], cpuUsage: ...]]
| Constructor and Description |
|---|
RxJavaHealthAggregator(ApplicationConfiguration applicationConfiguration)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.reactivestreams.Publisher<HealthResult> |
aggregate(HealthIndicator[] indicators,
HealthLevelOfDetail healthLevelOfDetail) |
org.reactivestreams.Publisher<HealthResult> |
aggregate(java.lang.String name,
org.reactivestreams.Publisher<HealthResult> results) |
protected java.lang.Object |
aggregateDetails(java.util.List<HealthResult> results) |
protected io.reactivex.Flowable<HealthResult> |
aggregateResults(HealthIndicator[] indicators) |
protected HealthResult |
buildResult(HealthStatus status,
java.lang.Object details,
HealthLevelOfDetail healthLevelOfDetail) |
protected HealthStatus |
calculateOverallStatus(java.util.List<HealthResult> results) |
public RxJavaHealthAggregator(ApplicationConfiguration applicationConfiguration)
applicationConfiguration - The application configuration.public org.reactivestreams.Publisher<HealthResult> aggregate(HealthIndicator[] indicators, HealthLevelOfDetail healthLevelOfDetail)
aggregate in interface HealthAggregator<HealthResult>indicators - The health indicators to aggregate.healthLevelOfDetail - The HealthLevelOfDetailpublic org.reactivestreams.Publisher<HealthResult> aggregate(java.lang.String name, org.reactivestreams.Publisher<HealthResult> results)
aggregate in interface HealthAggregator<HealthResult>name - The name of the new health resultresults - The health results to aggregate.HealthResult.protected HealthStatus calculateOverallStatus(java.util.List<HealthResult> results)
results - A list of HealthResultprotected io.reactivex.Flowable<HealthResult> aggregateResults(HealthIndicator[] indicators)
indicators - An array of HealthIndicatorprotected java.lang.Object aggregateDetails(java.util.List<HealthResult> results)
results - A list of health resultsprotected HealthResult buildResult(HealthStatus status, java.lang.Object details, HealthLevelOfDetail healthLevelOfDetail)
status - A HealthStatusdetails - The health status detailshealthLevelOfDetail - The HealthLevelOfDetailMap with the results from the health status