Class HealthResultFilter
java.lang.Object
io.micronaut.management.endpoint.health.filter.HealthResultFilter
@ServerFilter({"${endpoints.all.path:/}${endpoints.health.id:health}","${endpoints.all.path:/}${endpoints.health.id:health}/liveness","${endpoints.all.path:/}${endpoints.health.id:health}/readiness"})
@Requires(beans=HealthEndpoint.class)
@Internal
public class HealthResultFilter
extends Object
A filter that matches the
HealthEndpoint
and returns an appropriate HTTP status code.- Since:
- 1.0
- Author:
- graemerocher
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
HealthResultFilter
(HealthEndpoint healthEndpoint) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
doFilter
(MutableHttpResponse<?> response) Set response status by health result.
-
Field Details
-
DEFAULT_MAPPING
Configurable default mapping for filter.- See Also:
-
LIVENESS_PROBE_MAPPING
- See Also:
-
READINESS_PROBE_MAPPING
- See Also:
-
-
Constructor Details
-
HealthResultFilter
Default constructor.- Parameters:
healthEndpoint
- The health endpoint
-
-
Method Details
-
doFilter
Set response status by health result.- Parameters:
response
- http response
-