de.is24.util.monitoring.spring
Class MonitoringHandlerInterceptor
java.lang.Object
de.is24.util.monitoring.spring.MonitoringHandlerInterceptor
- All Implemented Interfaces:
- org.springframework.web.servlet.HandlerInterceptor
public class MonitoringHandlerInterceptor
- extends Object
- implements org.springframework.web.servlet.HandlerInterceptor
HandlerInterceptor to monitor duration of request processing
|
Method Summary |
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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
private static final org.apache.log4j.Logger LOG
PREFIX
private static final String PREFIX
- See Also:
- Constant Field Values
START_TIME
static final String START_TIME
- See Also:
- Constant Field Values
POST_HANDLE_TIME
static final String POST_HANDLE_TIME
- See Also:
- Constant Field Values
HANDLING
private static final String HANDLING
- See Also:
- Constant Field Values
RENDERING
private static final String RENDERING
- See Also:
- Constant Field Values
COMPLETE
private static final String COMPLETE
- See Also:
- Constant Field Values
ERROR
private static final String ERROR
- See Also:
- Constant Field Values
monitor
private InApplicationMonitor monitor
CGLIB_PATTERN
private static final Pattern CGLIB_PATTERN
MonitoringHandlerInterceptor
public MonitoringHandlerInterceptor()
preHandle
public boolean preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler)
throws Exception
- Specified by:
preHandle in interface org.springframework.web.servlet.HandlerInterceptor
- Throws:
Exception
postHandle
public void postHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler,
org.springframework.web.servlet.ModelAndView modelAndView)
throws Exception
- Specified by:
postHandle in interface org.springframework.web.servlet.HandlerInterceptor
- Throws:
Exception
afterCompletion
public void afterCompletion(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler,
Exception ex)
throws Exception
- check, whether
POST_HANDLE_TIME is set, and add timer measuremets for post phase and complete request.
- Specified by:
afterCompletion in interface org.springframework.web.servlet.HandlerInterceptor
- Throws:
Exception
getAndRemoveAttribute
private Object getAndRemoveAttribute(javax.servlet.http.HttpServletRequest request,
String attributeName)
getPrefix
protected String getPrefix(Object handler)
Copyright © 2013 Immobilien Scout GmbH. All Rights Reserved.