public class MonitoringHandlerInterceptor extends Object implements org.springframework.web.servlet.HandlerInterceptor
HandlerInterceptor to monitor duration of request processing| Modifier and Type | Field and Description |
|---|---|
private static Pattern |
CGLIB_PATTERN |
private static String |
COMPLETE |
private static String |
DUPLICATE_HANDLER |
private static String |
ERROR |
private static String |
HANDLING |
private static org.slf4j.Logger |
LOG |
private InApplicationMonitor |
monitor |
(package private) static String |
POST_HANDLE_TIME |
private static String |
PREFIX |
private static String |
RENDERING |
(package private) static String |
START_TIME |
private static String |
TIME_ERROR |
| Constructor and Description |
|---|
MonitoringHandlerInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterCompletion(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler,
Exception ex)
check, whether
POST_HANDLE_TIME is set, and add timer measuremets for post phase and complete request. |
private Object |
getAndRemoveAttribute(javax.servlet.http.HttpServletRequest request,
String attributeName) |
protected String |
getPrefix(Object handler) |
void |
postHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler,
org.springframework.web.servlet.ModelAndView modelAndView) |
boolean |
preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler) |
private static final org.slf4j.Logger LOG
private static final String PREFIX
static final String START_TIME
static final String POST_HANDLE_TIME
private static final String HANDLING
private static final String RENDERING
private static final String COMPLETE
private static final String ERROR
private static final String TIME_ERROR
private static final String DUPLICATE_HANDLER
private InApplicationMonitor monitor
private static final Pattern CGLIB_PATTERN
public boolean preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler)
throws Exception
preHandle in interface org.springframework.web.servlet.HandlerInterceptorExceptionpublic void postHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler,
org.springframework.web.servlet.ModelAndView modelAndView)
throws Exception
postHandle in interface org.springframework.web.servlet.HandlerInterceptorExceptionpublic void afterCompletion(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler,
Exception ex)
throws Exception
POST_HANDLE_TIME is set, and add timer measuremets for post phase and complete request.afterCompletion in interface org.springframework.web.servlet.HandlerInterceptorExceptionprivate Object getAndRemoveAttribute(javax.servlet.http.HttpServletRequest request, String attributeName)
Copyright © 2014 Immobilien Scout GmbH. All Rights Reserved.