Class HealthResultFilter
java.lang.Object
io.micronaut.http.filter.OncePerRequestHttpServerFilter
io.micronaut.management.endpoint.health.filter.HealthResultFilter
- All Implemented Interfaces:
Ordered
,HttpFilter
,HttpServerFilter
@Filter({"${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)
public class HealthResultFilter
extends OncePerRequestHttpServerFilter
A filter that matches the
HealthEndpoint
and returns an appropriate HTTP status code.- Since:
- 1.0
- Author:
- graemerocher
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Configurable default mapping for filter.static final String
static final String
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ModifierConstructorDescriptionprotected
HealthResultFilter
(HealthEndpoint healthEndpoint) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected Publisher<MutableHttpResponse<?>>
doFilterOnce
(HttpRequest<?> request, ServerFilterChain chain) Methods inherited from class io.micronaut.http.filter.OncePerRequestHttpServerFilter
doFilter, getKey
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.filter.HttpServerFilter
doFilter
-
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
-
doFilterOnce
protected Publisher<MutableHttpResponse<?>> doFilterOnce(HttpRequest<?> request, ServerFilterChain chain) - Specified by:
doFilterOnce
in classOncePerRequestHttpServerFilter
- Parameters:
request
- TheHttpRequest
instancechain
- TheServerFilterChain
instance- Returns:
- A
Publisher
for the Http response
-