org.nuiton.web.jmx
Class ServletStatisticsService
java.lang.Object
org.nuiton.web.jmx.ServletStatisticsService
- All Implemented Interfaces:
- ServletStatisticsServiceMBean
public class ServletStatisticsService
- extends Object
- implements ServletStatisticsServiceMBean
Implementation of ServletStatisticsServiceMBean.
For each request, it has a RequestStatistics instance and provide
an pre-filter and post-filter facade suitable for use in
MonitoringFilter.
|
Method Summary |
Map<String,RequestStatistics> |
getPerRequestStatistics()
Implementation of the MBean contract. |
void |
postFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
|
void |
preFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
|
void |
reset()
Implementation of the MBean contract. |
String |
toCsv()
Implementation of the MBean contract. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
requestStartTime
protected Map<javax.servlet.ServletRequest,Long> requestStartTime
perRequestStatistics
protected Map<String,RequestStatistics> perRequestStatistics
ServletStatisticsService
public ServletStatisticsService()
preFilter
public void preFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
postFilter
public void postFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
getPerRequestStatistics
public Map<String,RequestStatistics> getPerRequestStatistics()
- Implementation of the MBean contract.
- Specified by:
getPerRequestStatistics in interface ServletStatisticsServiceMBean
- Returns:
- a map with as key, the request Url, as value the statistics
gathered for this Url.
- See Also:
ServletStatisticsServiceMBean.getPerRequestStatistics()
toCsv
public String toCsv()
- Implementation of the MBean contract.
- Specified by:
toCsv in interface ServletStatisticsServiceMBean
- Returns:
- the csv content. Seperator is ','. One line per entries returned
by
ServletStatisticsServiceMBean.getPerRequestStatistics(). One column per attribute of
RequestStatistics. - See Also:
ServletStatisticsServiceMBean.toCsv()
reset
public void reset()
- Implementation of the MBean contract.
- Specified by:
reset in interface ServletStatisticsServiceMBean
- See Also:
ServletStatisticsServiceMBean.reset()
Copyright © 2011-2012 CodeLutin. All Rights Reserved.