Class HealthCheckHttpContext
- java.lang.Object
-
- org.apache.unomi.healthcheck.servlet.HealthCheckHttpContext
-
- All Implemented Interfaces:
org.osgi.service.http.HttpContext
public class HealthCheckHttpContext extends Object implements org.osgi.service.http.HttpContext
A simple implementation of theHttpContext
interface that provides basic authentication for health checks.
-
-
Constructor Summary
Constructors Constructor Description HealthCheckHttpContext(String realm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
authenticated(javax.servlet.http.HttpServletRequest request)
String
getMimeType(String s)
URL
getResource(String s)
boolean
handleSecurity(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
-
-
-
Constructor Detail
-
HealthCheckHttpContext
public HealthCheckHttpContext(String realm)
-
-
Method Detail
-
handleSecurity
public boolean handleSecurity(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws IOException
- Specified by:
handleSecurity
in interfaceorg.osgi.service.http.HttpContext
- Throws:
IOException
-
authenticated
protected boolean authenticated(javax.servlet.http.HttpServletRequest request)
-
getResource
public URL getResource(String s)
- Specified by:
getResource
in interfaceorg.osgi.service.http.HttpContext
-
-