Package org.apache.felix.hc.core.impl.servlet

## Class HealthCheckExecutorServlet

- java.lang.Object
- - jakarta.servlet.GenericServlet
  - - jakarta.servlet.http.HttpServlet
    - - org.apache.felix.hc.core.impl.servlet.HealthCheckExecutorServlet

All Implemented Interfaces:
  `jakarta.servlet.Servlet`, `jakarta.servlet.ServletConfig`, `Serializable`

    public class HealthCheckExecutorServlet
    extends jakarta.servlet.http.HttpServlet

Servlet that triggers the health check executor to return results via http. Parameters:

- tags: The health check tags to take into account
- format: html|json|jsonp|txt|verbose.txt
- includeDebug: If true, debug messages from result log are included.
- callback: For jsonp, the JS callback function name (defaults to "processHealthCheckResults")
- httpStatus: health check status to http status mapping in format httpStatus=WARN:418,CRITICAL:503,HEALTH_CHECK_ERROR:500.

For omitted health check status values the next best code will be used (e.g. for httpStatus=CRITICAL:503 a result WARN will return 200, CRITICAL 503 and HEALTH_CHECK_ERROR also 503). By default all requests answer with an http status of 200.

Useful in combination with load balancers.

See Also:
  Serialized Form

### Field Summary

Fields
`static String` `PARAM_SPLIT_REGEX`

### Constructor Summary

Constructors
`HealthCheckExecutorServlet()`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `activate​(org.apache.felix.hc.core.impl.servlet.HealthCheckExecutorServletConfiguration configuration, org.osgi.framework.BundleContext bundleContext)`
`void` `deactivate()`
`protected void` `doGet​(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)`
`protected void` `doGet​(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String pathTokensStr, String format)`

### Methods inherited from class jakarta.servlet.http.HttpServlet

`doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service`

### Methods inherited from class jakarta.servlet.GenericServlet

`destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### PARAM_SPLIT_REGEX

    public static final String PARAM_SPLIT_REGEX

See Also:
  Constant Field Values

### Constructor Detail

#### HealthCheckExecutorServlet

    public HealthCheckExecutorServlet()

### Method Detail

#### activate

    protected final void activate​(org.apache.felix.hc.core.impl.servlet.HealthCheckExecutorServletConfiguration configuration,
                                  org.osgi.framework.BundleContext bundleContext)

#### deactivate

    public void deactivate()

#### doGet

    protected void doGet​(jakarta.servlet.http.HttpServletRequest request,
                         jakarta.servlet.http.HttpServletResponse response,
                         String pathTokensStr,
                         String format)
                  throws jakarta.servlet.ServletException,
                         IOException

Throws:
  `jakarta.servlet.ServletException`
  `IOException`

#### doGet

    protected void doGet​(jakarta.servlet.http.HttpServletRequest request,
                         jakarta.servlet.http.HttpServletResponse response)
                  throws jakarta.servlet.ServletException,
                         IOException

Overrides:
  `doGet` in class `jakarta.servlet.http.HttpServlet`
Throws:
  `jakarta.servlet.ServletException`
  `IOException`