Methods Summary |
---|
public long | getBytesReceived()
return bytesReceived;
|
public long | getBytesSent()
return bytesSent;
|
public int | getContentLength()
return req.getContentLength();
|
public long | getCount200()
return count200;
|
public long | getCount2xx()
return count2xx;
|
public long | getCount302()
return count302;
|
public long | getCount304()
return count304;
|
public long | getCount3xx()
return count3xx;
|
public long | getCount400()
return count400;
|
public long | getCount401()
return count401;
|
public long | getCount403()
return count403;
|
public long | getCount404()
return count404;
|
public long | getCount4xx()
return count4xx;
|
public long | getCount503()
return count503;
|
public long | getCount5xx()
return count5xx;
|
public long | getCountOther()
return countOther;
|
public java.lang.String | getCurrentQueryString()
return req.queryString().toString();
|
public java.lang.String | getCurrentUri()
return req.requestURI().toString();
|
public int | getErrorCount()
return errorCount;
|
public RequestGroupInfo | getGlobalProcessor()
return global;
|
public long | getLastRequestCompletionTime()Gets the time when the last request was completed.
return lastCompletionTime;
|
public java.lang.String | getLastRequestMethod()Gets the HTTP method of the last request serviced.
return lastMethod;
|
public java.lang.String | getLastRequestURI()Gets the URI of the last request serviced.
return lastURI;
|
public java.lang.String | getMaxRequestUri()
return maxRequestUri;
|
public long | getMaxTime()
return maxTime;
|
public java.lang.String | getMethod()
return req.method().toString();
|
public long | getProcessingTime()
return processingTime;
|
public java.lang.String | getProtocol()
return req.protocol().toString();
|
public java.lang.String | getRemoteAddr()
req.action(ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, null);
return req.remoteAddr().toString();
|
public long | getRequestBytesReceived()
return req.getBytesRead();
|
public long | getRequestBytesSent()
return req.getResponse().getBytesWritten();
|
public long | getRequestCompletionTime()Gets the time taken to complete the request associated
with this RequestInfo.
return requestCompletionTime;
|
public int | getRequestCount()
return requestCount;
|
public long | getRequestProcessingTime()
return (System.currentTimeMillis() - req.getStartTime());
|
public int | getServerPort()
return req.getServerPort();
|
public int | getStage()
return stage;
|
public java.lang.String | getVirtualHost()
return req.serverName().toString();
|
public long | getWorkerThreadID()Gets the worker thread ID which is processing the request associated
with this RequestInfo. Return 0 if no thread ID has been associated.
return workerThreadID;
|
public void | reset()Resets this RequestInfo .
setBytesSent(0);
setBytesReceived(0);
setProcessingTime(0);
setMaxTime(0);
setMaxRequestUri(null);
setRequestCount(0);
setErrorCount(0);
setCount2xx(0);
setCount3xx(0);
setCount4xx(0);
setCount5xx(0);
setCountOther(0);
setCount200(0);
setCount302(0);
setCount304(0);
setCount400(0);
setCount401(0);
setCount403(0);
setCount404(0);
setCount503(0);
setWorkerThreadID(0);
setRequestCompletionTime(0);
// START SJSAS 6338793
lastMethod = null;
lastURI = null;
lastCompletionTime = 0;
// END SJSAS 6338793
|
public void | setBytesReceived(long bytesReceived)
this.bytesReceived = bytesReceived;
|
public void | setBytesSent(long bytesSent)
this.bytesSent = bytesSent;
|
public void | setCount200(long count200)
this.count200 = count200;
|
public void | setCount2xx(long count2xx)
this.count2xx = count2xx;
|
public void | setCount302(long count302)
this.count302 = count302;
|
public void | setCount304(long count304)
this.count304 = count304;
|
public void | setCount3xx(long count3xx)
this.count3xx = count3xx;
|
public void | setCount400(long count400)
this.count400 = count400;
|
public void | setCount401(long count401)
this.count401 = count401;
|
public void | setCount403(long count403)
this.count403 = count403;
|
public void | setCount404(long count404)
this.count404 = count404;
|
public void | setCount4xx(long count4xx)
this.count4xx = count4xx;
|
public void | setCount503(long count503)
this.count503 = count503;
|
public void | setCount5xx(long count5xx)
this.count5xx = count5xx;
|
public void | setCountOther(long countOther)
this.countOther = countOther;
|
public void | setErrorCount(int errorCount)
this.errorCount = errorCount;
|
public void | setGlobalProcessor(RequestGroupInfo global)
if( global != null) {
this.global=global;
global.addRequestProcessor( this );
} else {
if (this.global != null) {
this.global.removeRequestProcessor( this );
this.global = null;
}
}
|
public void | setMaxRequestUri(java.lang.String maxRequestUri)
this.maxRequestUri = maxRequestUri;
|
public void | setMaxTime(long maxTime)
this.maxTime = maxTime;
|
public void | setProcessingTime(long processingTime)
this.processingTime = processingTime;
|
public void | setRequestCompletionTime(long completionTime)Sets the time taken to complete the request associated
with this RequestInfo.
this.requestCompletionTime = completionTime;
|
public void | setRequestCount(int requestCount)
this.requestCount = requestCount;
|
public void | setStage(int stage)
this.stage = stage;
|
public void | setWorkerThreadID(long workerThreadID)Sets the worker thread ID responsible for processing the request
associated with this RequestInfo.
this.workerThreadID = workerThreadID;
|
void | updateCounters()Called by the processor before recycling the request. It'll collect
statistic information.
bytesReceived+=req.getBytesRead();
bytesSent+=req.getResponse().getBytesWritten();
requestCount++;
int responseStatus = req.getResponse().getStatus();
// START S1AS
if (responseStatus >= 200 && responseStatus < 299) {
// 2xx
count2xx++;
if (responseStatus == 200) {
count200++;
}
} else if (responseStatus >= 300 && responseStatus < 399) {
// 3xx
count3xx++;
if (responseStatus == 302) {
count302++;
} else if (responseStatus == 304) {
count304++;
}
} else if (responseStatus >= 400 && responseStatus < 499) {
// 4xx
count4xx++;
if (responseStatus == 400) {
count400++;
} else if (responseStatus == 401) {
count401++;
} else if (responseStatus == 403) {
count403++;
} else if (responseStatus == 404) {
count404++;
}
} else if (responseStatus >= 500 && responseStatus < 599) {
// 5xx
count5xx++;
if (responseStatus == 503) {
count503++;
}
} else {
// Other
countOther++;
}
// END S1AS
if (responseStatus >= 400) {
errorCount++;
}
long t0=req.getStartTime();
long t1=System.currentTimeMillis();
requestCompletionTime = t1-t0;
processingTime+=requestCompletionTime;
if( maxTime < requestCompletionTime ) {
maxTime=requestCompletionTime;
maxRequestUri=req.requestURI().toString();
}
// START SJSAS 6338793
lastURI = req.requestURI().toString();
lastMethod = req.method().toString();
lastCompletionTime = t1;
// END SJAS 6338793
|