Package io.dropwizard.health.response
Class ServletHealthResponderFactory
- java.lang.Object
-
- io.dropwizard.health.response.ServletHealthResponderFactory
-
- All Implemented Interfaces:
HealthResponderFactory,Discoverable
public class ServletHealthResponderFactory extends Object implements HealthResponderFactory
A servlet-based implementation ofHealthResponderFactory, to respond to health check requests.
-
-
Constructor Summary
Constructors Constructor Description ServletHealthResponderFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(String name, Collection<String> healthCheckUrlPaths, HealthResponseProvider healthResponseProvider, HealthEnvironment health, JerseyEnvironment jersey, ServletEnvironment servlets, com.fasterxml.jackson.databind.ObjectMapper mapper)Configures a health responder for responding to health check requests (e.g. from load balancer).StringgetCacheControlValue()booleanisCacheControlEnabled()voidsetCacheControlEnabled(boolean cacheControlEnabled)voidsetCacheControlValue(String cacheControlValue)
-
-
-
Method Detail
-
isCacheControlEnabled
public boolean isCacheControlEnabled()
-
setCacheControlEnabled
public void setCacheControlEnabled(boolean cacheControlEnabled)
-
getCacheControlValue
public String getCacheControlValue()
-
setCacheControlValue
public void setCacheControlValue(String cacheControlValue)
-
configure
public void configure(String name, Collection<String> healthCheckUrlPaths, HealthResponseProvider healthResponseProvider, HealthEnvironment health, JerseyEnvironment jersey, ServletEnvironment servlets, com.fasterxml.jackson.databind.ObjectMapper mapper)
Description copied from interface:HealthResponderFactoryConfigures a health responder for responding to health check requests (e.g. from load balancer).- Specified by:
configurein interfaceHealthResponderFactory- Parameters:
name- The name of the application.healthCheckUrlPaths- The paths to expose a health check on.healthResponseProvider- A provider of responses to respond to requests with.health- The health environment.jersey- The Jersey environment.servlets- The servlet environment.mapper- A Jackson object mapper to allow writing JSON responses (if needed).
-
-