|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmonit.web.JMonitFilter
public class JMonitFilter
A servlet Filter to be configured in your WEB-INF/web.xml to intercept all incoming request.
<filter> <filter-name>jMonit</filter-name> <filter-class>org.jmonit.web.JMonitFilter</filter-class> </filter> <filter-mapping> <filter-name>jMonit</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
A monitor will be created for each application URI. By default, the requested resource extension is used to group monitors in sub-categories.
Constructor Summary | |
---|---|
JMonitFilter()
|
Method Summary | |
---|---|
protected java.lang.String |
buildMonitorNameFromUri(java.lang.String uri)
Build the monitor name from request URI. |
void |
destroy()
|
void |
doFilter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
Http specific doFilter implementation |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Delegates to Http based doFilter. |
protected java.lang.String |
getRequestedUri(javax.servlet.http.HttpServletRequest request)
|
protected java.lang.String |
getTagForUri(java.lang.String uri)
Build the monitor name from request URI. |
void |
init(javax.servlet.FilterConfig filterConfig)
|
protected void |
initDefaultTags(javax.servlet.FilterConfig filterConfig)
|
protected void |
initMapping(javax.servlet.FilterConfig filterConfig)
|
protected void |
initRepository(javax.servlet.FilterConfig filterConfig)
|
void |
setRepository(Repository repository)
|
void |
setTags(java.util.Map<java.lang.String,java.lang.String> tags)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JMonitFilter()
Method Detail |
---|
public void destroy()
destroy
in interface javax.servlet.Filter
Filter.destroy()
public void doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
request
- Http requestresponse
- Http responsechain
- request chain
java.io.IOException
- IO exception occurs
javax.servlet.ServletException
- servlet Exception occursprotected java.lang.String getRequestedUri(javax.servlet.http.HttpServletRequest request)
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
java.io.IOException
javax.servlet.ServletException
Filter.doFilter(javax.servlet.ServletRequest,
javax.servlet.ServletResponse, javax.servlet.FilterChain)
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
Filter.init(javax.servlet.FilterConfig)
public void setTags(java.util.Map<java.lang.String,java.lang.String> tags)
tags
- The tags to setpublic void setRepository(Repository repository)
repository
- the repository to setprotected java.lang.String buildMonitorNameFromUri(java.lang.String uri)
Override this method in a custom filter to define application specific monitors based on URIs.
uri
- requested URI
protected java.lang.String getTagForUri(java.lang.String uri)
Override this method in a custom filter to define application specific monitors based on URIs.
uri
- requested URI
protected void initDefaultTags(javax.servlet.FilterConfig filterConfig)
filterConfig
- configurationprotected void initMapping(javax.servlet.FilterConfig filterConfig)
filterConfig
- configurationprotected void initRepository(javax.servlet.FilterConfig filterConfig)
filterConfig
- configuration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |