Fields Summary |
---|
private com.sun.enterprise.admin.monitor.stats.GenericStatsImpl | baseStatsImpl |
private long | startTime |
private LinkedList | httpListenerStats |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | countRequests |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | countBytesReceived |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | countBytesTransmitted |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | rateBytesTransmitted |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | maxByteTransmissionRate |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | countOpenConnections |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | maxOpenConnections |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | count2xx |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | count3xx |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | count4xx |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | count5xx |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | countOther |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | count200 |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | count302 |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | count304 |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | count400 |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | count401 |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | count403 |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | count404 |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | count503 |
Methods Summary |
---|
public void | addHttpListenerStats(HTTPListenerStatsImpl stats)Adds the given HTTPListenerStatsImpl to the list of
HTTPListenerStatsImpl from which this
PWCRequestStatsImpl gathers its stats.
httpListenerStats.add(stats);
|
public javax.management.j2ee.statistics.CountStatistic | getCount200()Gets the number of responses with a 200 response code.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCount200Long();
}
count200.setCount(count);
return (CountStatistic)count200.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCount2xx()Gets the number of 200-level responses sent.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCount2xxLong();
}
count2xx.setCount(count);
return (CountStatistic)count2xx.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCount302()Gets the number of responses with a 302 response code.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCount302Long();
}
count302.setCount(count);
return (CountStatistic)count302.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCount304()Gets the number of responses with a 304 response code.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCount304Long();
}
count304.setCount(count);
return (CountStatistic)count304.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCount3xx()Gets the number of 300-level responses sent.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCount3xxLong();
}
count3xx.setCount(count);
return (CountStatistic)count3xx.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCount400()Gets the number of responses with a 400 response code.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCount400Long();
}
count400.setCount(count);
return (CountStatistic)count400.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCount401()Gets the number of responses with a 401 response code.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCount401Long();
}
count401.setCount(count);
return (CountStatistic)count401.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCount403()Gets the number of responses with a 403 response code.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCount403Long();
}
count403.setCount(count);
return (CountStatistic)count403.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCount404()Gets the number of responses with a 404 response code.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCount404Long();
}
count404.setCount(count);
return (CountStatistic)count404.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCount4xx()Gets the number of 400-level responses sent.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCount4xxLong();
}
count4xx.setCount(count);
return (CountStatistic)count4xx.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCount503()Gets the number of responses with a 503 response code.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCount503Long();
}
count503.setCount(count);
return (CountStatistic)count503.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCount5xx()Gets the number of 500-level responses sent.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCount5xxLong();
}
count5xx.setCount(count);
return (CountStatistic)count5xx.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCountBytesReceived()Gets the number of bytes received.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getBytesReceivedLong();
}
countBytesReceived.setCount(count);
return (CountStatistic)countBytesReceived.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCountBytesTransmitted()Gets the number of bytes transmitted.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getBytesSentLong();
}
countBytesTransmitted.setCount(count);
return (CountStatistic)countBytesTransmitted.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCountOpenConnections()Gets the number of open connections.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCountOpenConnectionsLong();
}
countOpenConnections.setCount(count);
return (CountStatistic)countOpenConnections.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCountOther()Gets the number of responses sent that were not 200, 300, 400,
or 500 level.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getCountOtherLong();
}
countOther.setCount(count);
return (CountStatistic)countOther.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCountRequests()Gets the number of requests serviced.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getRequestCountLong();
}
countRequests.setCount(count);
return (CountStatistic)countRequests.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getMaxByteTransmissionRate()Gets the maximum rate at which data was transmitted over some
server-defined interval.
maxByteTransmissionRate.setCount(0);
return (CountStatistic)maxByteTransmissionRate.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getMaxOpenConnections()Gets the maximum number of open connections.
long count = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
count += httpListenerStats.get(i).getMaxOpenConnectionsLong();
}
maxOpenConnections.setCount(count);
return (CountStatistic)maxOpenConnections.unmodifiableView();
|
public com.sun.enterprise.admin.monitor.stats.StringStatistic | getMethod()Gets the method of the last request serviced.
String lastMethod = "unknown";
long lastRequestTime = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
HTTPListenerStatsImpl listener = httpListenerStats.get(i);
if (listener.getLastRequestCompletionTime() > lastRequestTime) {
lastRequestTime = listener.getLastRequestCompletionTime();
lastMethod = listener.getLastRequestMethod();
}
}
return new StringStatisticImpl(
lastMethod,
"method",
"String",
"Method of the last request serviced",
startTime,
System.currentTimeMillis());
|
public javax.management.j2ee.statistics.CountStatistic | getRateBytesTransmitted()Gets the rate (in bytes per second) at which data was transmitted
over some server-defined interval.
rateBytesTransmitted.setCount(0);
return (CountStatistic)rateBytesTransmitted.unmodifiableView();
|
public javax.management.j2ee.statistics.Statistic | getStatistic(java.lang.String name)Gets the statistic with the given name.
return baseStatsImpl.getStatistic(name);
|
public java.lang.String[] | getStatisticNames()Gets the names of all statistics exposed by this PWCRequestStatsImpl
return baseStatsImpl.getStatisticNames();
|
public javax.management.j2ee.statistics.Statistic[] | getStatistics()Gets all statistics exposed by this PWCRequestStatsImpl
return baseStatsImpl.getStatistics();
|
public com.sun.enterprise.admin.monitor.stats.StringStatistic | getUri()Gets the URI of the last request serviced.
String lastURI = "unknown";
long lastRequestTime = 0;
int size = httpListenerStats.size();
for (int i=0; i<size; i++) {
HTTPListenerStatsImpl listener = httpListenerStats.get(i);
if (listener.getLastRequestCompletionTime() > lastRequestTime) {
lastRequestTime = listener.getLastRequestCompletionTime();
lastURI = listener.getLastRequestURI();
}
}
return new StringStatisticImpl(
lastURI,
"uri",
"String",
"URI of the last request serviced",
startTime,
System.currentTimeMillis());
|
private void | initializeStatistics()
startTime = System.currentTimeMillis();
CountStatistic c = new CountStatisticImpl("CountRequests");
countRequests = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("CountBytesReceived");
countBytesReceived = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("CountBytesTransmitted");
countBytesTransmitted = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("RateBytesTransmitted");
rateBytesTransmitted = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("MaxByteTransmissionRate");
maxByteTransmissionRate = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("CountOpenConnections");
countOpenConnections = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("MaxOpenConnections");
maxOpenConnections = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("Count2xx");
count2xx = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("Count3xx");
count3xx = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("Count4xx");
count4xx = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("Count5xx");
count5xx = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("CountOther");
countOther = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("Count200");
count200 = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("Count302");
count302 = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("Count304");
count304 = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("Count400");
count400 = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("Count401");
count401 = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("Count403");
count403 = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("Count404");
count404 = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("Count503");
count503 = new MutableCountStatisticImpl(c);
|