org.javasimon.javaee
Class SimonServletFilterUtils
java.lang.Object
org.javasimon.javaee.SimonServletFilterUtils
public class SimonServletFilterUtils
- extends Object
Various supporting utility methods for SimonServletFilter.
- Author:
- virgo47@gmail.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimonServletFilterUtils
public SimonServletFilterUtils()
getSimonName
public static String getSimonName(String uri,
Replacer unallowedCharacterReplacer)
- Returns Simon name for the specified request (local name without any configured prefix). By default dots and all non-simon-name
compliant characters are removed first, then all slashes are switched to dots (repeating slashes make one dot).
- Parameters:
uri - request URIunallowedCharacterReplacer - replacer for characters that are not allowed in Simon name
- Returns:
- local part of the Simon name for the request URI (without prefix)
initStopwatchSource
protected static StopwatchSource<javax.servlet.http.HttpServletRequest> initStopwatchSource(javax.servlet.FilterConfig filterConfig,
Manager manager)
- Create and initialize the stopwatch source depending on the filter init parameters. Both
monitor source class (
SimonServletFilter.INIT_PARAM_STOPWATCH_SOURCE_CLASS and whether
to cache results (SimonServletFilter.INIT_PARAM_STOPWATCH_SOURCE_CACHE) can be adjusted.
- Parameters:
filterConfig - Filter configuration
- Returns:
- Stopwatch source
initRequestReporter
public static RequestReporter initRequestReporter(javax.servlet.FilterConfig filterConfig)
- Returns RequestReporter for the class specified for context parameter
SimonServletFilter.INIT_PARAM_REQUEST_REPORTER_CLASS.
Copyright © 2014. All rights reserved.