Fields Summary |
---|
private static final Logger | _logger |
protected org.apache.catalina.Manager | sessionManager |
protected com.sun.enterprise.admin.monitor.stats.GenericStatsImpl | baseStatsImpl |
private com.sun.enterprise.web.monitor.PwcWebModuleStats | pwcWebStats |
private long | initTime |
protected com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | jspCount |
protected com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | jspReloadCount |
protected com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | jspErrorCount |
protected com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | sessionsTotal |
protected com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | activeSessionsCurrent |
protected com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | activeSessionsHigh |
protected com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | rejectedSessionsTotal |
protected com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | expiredSessionsTotal |
protected com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | processingTimeMillis |
Methods Summary |
---|
public javax.management.j2ee.statistics.CountStatistic | getActiveSessionsCurrent()Gets the number of currently active sessions for the web
module associated with this WebModuleStatsImpl.
.
if (pwcWebStats == null) {
throw new IllegalArgumentException("Null PwcWebModuleStats");
}
activeSessionsCurrent.setCount(pwcWebStats.getActiveSessionsCurrent());
return (CountStatistic) activeSessionsCurrent.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getActiveSessionsHigh()Gets the maximum number of concurrently active sessions for the web
module associated with this WebModuleStatsImpl.
if (pwcWebStats == null) {
throw new IllegalArgumentException("Null PwcWebModuleStats");
}
activeSessionsHigh.setCount(pwcWebStats.getActiveSessionsHigh());
return (CountStatistic) activeSessionsHigh.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getExpiredSessionsTotal()Gets the total number of expired sessions for the web
module associated with this WebModuleStatsImpl.
.
if (pwcWebStats == null) {
throw new IllegalArgumentException("Null PwcWebModuleStats");
}
expiredSessionsTotal.setCount(pwcWebStats.getExpiredSessionsTotal());
return (CountStatistic) expiredSessionsTotal.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getJspCount()Gets the number of JSPs that have been loaded in the web module
associated with this WebModuleStatsImpl.
.
if (pwcWebStats == null) {
throw new IllegalArgumentException("Null PwcWebModuleStats");
}
jspCount.setCount(pwcWebStats.getJspCount());
return (CountStatistic) jspCount.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getJspErrorCount()Gets the number of errors that were triggered by JSP invocations.
.
if (pwcWebStats == null) {
throw new IllegalArgumentException("Null PwcWebModuleStats");
}
jspErrorCount.setCount(pwcWebStats.getJspErrorCount());
return (CountStatistic) jspErrorCount.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getJspReloadCount()Gets the number of JSPs that have been reloaded in the web module
associated with this WebModuleStatsImpl.
.
if (pwcWebStats == null) {
throw new IllegalArgumentException("Null PwcWebModuleStats");
}
jspReloadCount.setCount(pwcWebStats.getJspReloadCount());
return (CountStatistic) jspReloadCount.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getRejectedSessionsTotal()Gets the total number of rejected sessions for the web
module associated with this WebModuleStatsImpl.
This is the number of sessions that were not created because the
maximum allowed number of sessions were active.
if (pwcWebStats == null) {
throw new IllegalArgumentException("Null PwcWebModuleStats");
}
rejectedSessionsTotal.setCount(pwcWebStats.getRejectedSessionsTotal());
return (CountStatistic) rejectedSessionsTotal.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getServletProcessingTimes()Gets the cumulative processing times of all servlets in the web module
associated with this WebModuleStatsImpl.
if (pwcWebStats == null) {
throw new IllegalArgumentException("Null PwcWebModuleStats");
}
processingTimeMillis.setCount(
pwcWebStats.getServletProcessingTimesMillis());
return (CountStatistic) processingTimeMillis.unmodifiableView();
|
public com.sun.enterprise.admin.monitor.stats.StringStatistic | getSessions()Returns comma-separated list of all sessions currently active in the web
module associated with this WebModuleStatsImpl.
StringBuffer sb = null;
if (pwcWebStats == null) {
throw new IllegalArgumentException("Null PwcWebModuleStats");
}
String sessionIds = pwcWebStats.getSessionIds();
if (sessionIds != null) {
sb = new StringBuffer();
StringTokenizer tokenizer = new StringTokenizer(sessionIds, " ");
boolean first = true;
while (tokenizer.hasMoreTokens()) {
if (!first) {
sb.append(", ");
} else {
first = false;
}
String sessionId = tokenizer.nextToken();
sb.append(sessionId);
HashMap map = pwcWebStats.getSession(sessionId);
if (map != null) {
sb.append(":");
sb.append(map);
}
}
}
return new StringStatisticImpl(
sb != null ? sb.toString(): null,
"Sessions",
"String",
"List of currently active sessions",
initTime,
System.currentTimeMillis());
|
public javax.management.j2ee.statistics.CountStatistic | getSessionsTotal()Gets the total number of sessions that have been created for the web
module associated with this WebModuleStatsImpl.
.
if (pwcWebStats == null) {
throw new IllegalArgumentException("Null PwcWebModuleStats");
}
sessionsTotal.setCount(pwcWebStats.getSessionsTotal());
return (CountStatistic) sessionsTotal.unmodifiableView();
|
public javax.management.j2ee.statistics.Statistic | getStatistic(java.lang.String name)Queries for a statistic by name.
return baseStatsImpl.getStatistic(name);
|
public java.lang.String[] | getStatisticNames()Returns the names of all statistics that may be retrieved from this
WebModuleStatsImpl instance.
return baseStatsImpl.getStatisticNames();
|
public javax.management.j2ee.statistics.Statistic[] | getStatistics()Gets all statistics exposed by this WebModuleStatsImpl instance.
return baseStatsImpl.getStatistics();
|
private void | initializeStatistics()
jspCount = new MutableCountStatisticImpl(
new CountStatisticImpl("JspCount"));
jspReloadCount = new MutableCountStatisticImpl(
new CountStatisticImpl("JspReloadCount"));
jspErrorCount = new MutableCountStatisticImpl(
new CountStatisticImpl("JspErrorCount"));
sessionsTotal = new MutableCountStatisticImpl(
new CountStatisticImpl("SessionsTotal"));
activeSessionsCurrent = new MutableCountStatisticImpl(
new CountStatisticImpl("ActiveSessionsCurrent"));
activeSessionsHigh = new MutableCountStatisticImpl(
new CountStatisticImpl("ActiveSessionsHigh"));
rejectedSessionsTotal = new MutableCountStatisticImpl(
new CountStatisticImpl("RejectedSessionsTotal"));
expiredSessionsTotal = new MutableCountStatisticImpl(
new CountStatisticImpl("ExpiredSessionsTotal"));
processingTimeMillis = new MutableCountStatisticImpl(
new CountStatisticImpl("ServletProcessingTimes"));
initTime = System.currentTimeMillis ();
|
public void | reset()Resets this WebModuleStats.
// Reset session stats
if (sessionManager instanceof MonitorStatsCapable) {
((MonitorStatsCapable)sessionManager).resetMonitorStats();
}
if (pwcWebStats != null) {
pwcWebStats.reset();
}
|
public void | setPwcWebModuleStats(com.sun.enterprise.web.monitor.PwcWebModuleStats pwcWebStats)Sets the PwcWebModuleStats instance to which this WebModuleStatsImpl is
going to delegate.
if (pwcWebStats == null) {
throw new IllegalArgumentException("Null PwcWebModuleStats");
}
this.pwcWebStats = pwcWebStats;
|
public void | setSessionManager(org.apache.catalina.Manager manager)Sets the session manager that this WebModuleStatsImpl is going to query
for session-related stats.
if (manager == null) {
throw new IllegalArgumentException("Null session manager");
}
this.sessionManager = manager;
|