|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.javaee.SimonServletFilterUtils
public class SimonServletFilterUtils
Various supporting utility methods for SimonServletFilter.
| Field Summary | |
|---|---|
private static Replacer |
TO_DOT_PATTERN
Regex replacer for any number of slashes or dots for a single dot. |
| Constructor Summary | |
|---|---|
SimonServletFilterUtils()
|
|
| Method Summary | |
|---|---|
private static StopwatchSource<javax.servlet.http.HttpServletRequest> |
createMonitorForSourceSpecifiedClass(String stopwatchSourceClass,
Manager manager)
|
private static StopwatchSource<javax.servlet.http.HttpServletRequest> |
createMonitorSource(String stopwatchSourceClass,
Manager manager)
|
(package private) static Replacer |
createUnallowedCharsReplacer(String replacement)
Creates new replacer for unallowed characters in the URL. |
static String |
getSimonName(String uri,
Replacer unallowedCharacterReplacer)
Returns Simon name for the specified request (local name without any configured prefix). |
static RequestReporter |
initRequestReporter(javax.servlet.FilterConfig filterConfig)
Returns RequestReporter for the class specified for context parameter SimonServletFilter.INIT_PARAM_REQUEST_REPORTER_CLASS. |
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. |
private static void |
injectSimonPrefixIntoMonitorSource(javax.servlet.FilterConfig filterConfig,
MonitorSource<javax.servlet.http.HttpServletRequest,Stopwatch> stopwatchSource)
|
private static StopwatchSource<javax.servlet.http.HttpServletRequest> |
monitorSourceNewInstance(Manager manager,
Class<?> monitorClass)
|
private static StopwatchSource<javax.servlet.http.HttpServletRequest> |
wrapMonitorSourceWithCacheIfNeeded(StopwatchSource<javax.servlet.http.HttpServletRequest> stopwatchSource,
String cache)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final Replacer TO_DOT_PATTERN
| Constructor Detail |
|---|
public SimonServletFilterUtils()
| Method Detail |
|---|
static Replacer createUnallowedCharsReplacer(String replacement)
SimonUtils.NAME_PATTERN_CHAR_CLASS_CONTENT) and replaces its dot with slash too (dots are to be
replaced, slashs preserved in this step of URL processing).
replacement - replacement string (for every unallowed character)
public static String getSimonName(String uri,
Replacer unallowedCharacterReplacer)
uri - request URIunallowedCharacterReplacer - replacer for characters that are not allowed in Simon name
protected static StopwatchSource<javax.servlet.http.HttpServletRequest> initStopwatchSource(javax.servlet.FilterConfig filterConfig,
Manager manager)
SimonServletFilter.INIT_PARAM_STOPWATCH_SOURCE_CLASS and whether
to cache results (SimonServletFilter.INIT_PARAM_STOPWATCH_SOURCE_CACHE) can be adjusted.
filterConfig - Filter configuration
private static StopwatchSource<javax.servlet.http.HttpServletRequest> createMonitorSource(String stopwatchSourceClass,
Manager manager)
private static void injectSimonPrefixIntoMonitorSource(javax.servlet.FilterConfig filterConfig,
MonitorSource<javax.servlet.http.HttpServletRequest,Stopwatch> stopwatchSource)
private static StopwatchSource<javax.servlet.http.HttpServletRequest> wrapMonitorSourceWithCacheIfNeeded(StopwatchSource<javax.servlet.http.HttpServletRequest> stopwatchSource,
String cache)
private static StopwatchSource<javax.servlet.http.HttpServletRequest> createMonitorForSourceSpecifiedClass(String stopwatchSourceClass,
Manager manager)
private static StopwatchSource<javax.servlet.http.HttpServletRequest> monitorSourceNewInstance(Manager manager,
Class<?> monitorClass)
throws InstantiationException,
IllegalAccessException
InstantiationException
IllegalAccessExceptionpublic static RequestReporter initRequestReporter(javax.servlet.FilterConfig filterConfig)
SimonServletFilter.INIT_PARAM_REQUEST_REPORTER_CLASS.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||