public class ServletHealth extends java.lang.Object implements java.lang.AutoCloseable, javax.servlet.Filter, java.lang.Iterable<org.echocat.jomon.runtime.util.Entry<java.util.regex.Pattern,ServletHealth.ScopeMapping>>
| Modifier and Type | Class and Description |
|---|---|
protected class |
ServletHealth.MBeanInformation |
static class |
ServletHealth.MeasurePoints |
static class |
ServletHealth.ScopeMapping |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AVERAGE_REQUEST_DURATION_ATTRIBUTE_NAME |
static java.lang.String |
CURRENT_REQUEST_STOP_WATCH_ATTRIBUTE_NAME |
static java.lang.String |
EXCLUDES_HOSTS |
static java.lang.String |
INCLUDES_HOSTS |
static java.lang.String |
INTERCEPTOR_INIT_ATTRIBUTE |
static java.lang.String |
INTERCEPTOR_REF_INIT_ATTRIBUTE |
static java.lang.String |
MAPPING_INIT_ATTRIBUTE |
static java.lang.String |
REGISTRY_REF_INIT_ATTRIBUTE |
static java.lang.String |
REQUESTS_PER_SECOND_ATTRIBUTE_NAME |
| Constructor and Description |
|---|
ServletHealth() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<java.lang.String,ServletHealth.ScopeMapping> |
asNameToMapping(java.lang.Iterable<ServletHealth.ScopeMapping> values) |
void |
close() |
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
static org.echocat.jomon.runtime.util.Duration |
findCurrentRequestDurationOf(javax.servlet.ServletRequest request) |
ServletHealthInterceptor |
getInterceptor() |
java.lang.String |
getMapping() |
protected ServletHealth.ScopeMapping |
getMapping(java.lang.String defaultName) |
protected ServletHealth.ScopeMapping |
getMappingFor(java.lang.String path) |
JmxRegistry |
getRegistry() |
protected void |
handleHostIncludeExcludesIfNeeded(javax.servlet.FilterConfig filterConfig) |
void |
init() |
void |
init(javax.servlet.FilterConfig filterConfig) |
java.util.Iterator<org.echocat.jomon.runtime.util.Entry<java.util.regex.Pattern,ServletHealth.ScopeMapping>> |
iterator() |
ServletHealthInterceptor |
loadInterceptor(java.lang.String interceptorTypeName) |
void |
setInterceptor(ServletHealthInterceptor interceptor) |
void |
setMapping(java.lang.String mappingAsString) |
void |
setRegistry(JmxRegistry registry) |
public static final java.lang.String MAPPING_INIT_ATTRIBUTE
public static final java.lang.String REGISTRY_REF_INIT_ATTRIBUTE
public static final java.lang.String EXCLUDES_HOSTS
public static final java.lang.String INCLUDES_HOSTS
public static final java.lang.String INTERCEPTOR_INIT_ATTRIBUTE
public static final java.lang.String INTERCEPTOR_REF_INIT_ATTRIBUTE
public static final java.lang.String REQUESTS_PER_SECOND_ATTRIBUTE_NAME
public static final java.lang.String AVERAGE_REQUEST_DURATION_ATTRIBUTE_NAME
public static final java.lang.String CURRENT_REQUEST_STOP_WATCH_ATTRIBUTE_NAME
public void setMapping(@Nullable
java.lang.String mappingAsString)
@Nullable public java.lang.String getMapping()
public ServletHealthInterceptor getInterceptor()
public void setInterceptor(ServletHealthInterceptor interceptor)
public void setRegistry(@Nullable
JmxRegistry registry)
@Nonnull public JmxRegistry getRegistry()
@Nonnull protected java.util.Map<java.lang.String,ServletHealth.ScopeMapping> asNameToMapping(@Nonnull java.lang.Iterable<ServletHealth.ScopeMapping> values)
public void init()
public void init(@Nonnull
javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionprotected void handleHostIncludeExcludesIfNeeded(@Nonnull
javax.servlet.FilterConfig filterConfig)
@Nonnull public ServletHealthInterceptor loadInterceptor(@Nonnull java.lang.String interceptorTypeName) throws javax.servlet.ServletException
javax.servlet.ServletExceptionpublic void close()
close in interface java.lang.AutoCloseablepublic void destroy()
destroy in interface javax.servlet.Filter@Nonnull public java.util.Iterator<org.echocat.jomon.runtime.util.Entry<java.util.regex.Pattern,ServletHealth.ScopeMapping>> iterator()
iterator in interface java.lang.Iterable<org.echocat.jomon.runtime.util.Entry<java.util.regex.Pattern,ServletHealth.ScopeMapping>>public void doFilter(@Nonnull
javax.servlet.ServletRequest request,
@Nonnull
javax.servlet.ServletResponse response,
@Nonnull
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.Filterjava.io.IOExceptionjavax.servlet.ServletException@Nullable
public static org.echocat.jomon.runtime.util.Duration findCurrentRequestDurationOf(@Nonnull
javax.servlet.ServletRequest request)
@Nullable protected ServletHealth.ScopeMapping getMappingFor(@Nonnull java.lang.String path)
@Nullable protected ServletHealth.ScopeMapping getMapping(@Nonnull java.lang.String defaultName)
Copyright © 2016 echocat. All Rights Reserved.