Class RequestInfo
java.lang.Object
org.apache.coyote.RequestInfo
Structure holding the Request and Response objects. It also holds statistical information about request processing
and provide management information about the requests being processed. Each thread uses a Request/Response pair that
is recycled on each request. This object provides a place to collect global low-level statistics - without having to
deal with synchronization (since each thread will have its own RequestProcessorMX).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturn the total bytes received.longReturn the total bytes sent.intReturn the content length.Return the current query string.Return the current request URI.intReturn the error count.Return the global request processor.longReturn the processing time of the last request.Return the URI of the request with the longest processing time.longReturn the maximum request processing time.Return the HTTP method.Return the peer address.longReturn the total processing time.Return the protocol.Return the remote address.Obtain the remote address for this connection as reported by an intermediate proxy (if any).longReturn the bytes received for the current request.longReturn the bytes sent for the current request.intReturn the request count.longReturn the processing time for the current request.Return the MBean name.intReturn the server port.intgetStage()Return the current processing stage.Return the virtual host.Return the worker thread name.voidRecycle all statistics.voidsetBytesReceived(long bytesReceived) Reset the bytes received.voidsetBytesSent(long bytesSent) Reset the bytes sent.voidsetErrorCount(int errorCount) Reset the error count.voidsetGlobalProcessor(RequestGroupInfo global) Set the global request processor.voidsetLastRequestProcessingTime(long lastRequestProcessingTime) Set the last request processing time.voidsetMaxRequestUri(String maxRequestUri) Set the maximum request URI.voidsetMaxTime(long maxTime) Reset the maximum time.voidsetProcessingTime(long processingTime) Reset the processing time.voidsetRequestCount(int requestCount) Reset the request count.voidsetRpName(ObjectName rpName) Set the MBean name.voidsetStage(int stage) Set the current processing stage.voidsetWorkerThreadName(String workerThreadName) Set the worker thread name.
-
Constructor Details
-
RequestInfo
-
-
Method Details
-
getGlobalProcessor
Return the global request processor.- Returns:
- the global processor
-
setGlobalProcessor
Set the global request processor.- Parameters:
global- the global processor
-
getMethod
-
getCurrentUri
-
getCurrentQueryString
Return the current query string.- Returns:
- the current query string
-
getProtocol
-
getVirtualHost
-
getServerPort
public int getServerPort()Return the server port.- Returns:
- the server port
-
getRemoteAddr
-
getPeerAddr
-
getRemoteAddrForwarded
Obtain the remote address for this connection as reported by an intermediate proxy (if any).- Returns:
- The remote address for this connection
-
getContentLength
public int getContentLength()Return the content length.- Returns:
- the content length
-
getRequestBytesReceived
public long getRequestBytesReceived()Return the bytes received for the current request.- Returns:
- the bytes received
-
getRequestBytesSent
public long getRequestBytesSent()Return the bytes sent for the current request.- Returns:
- the bytes sent
-
getRequestProcessingTime
public long getRequestProcessingTime()Return the processing time for the current request.- Returns:
- the processing time
-
getStage
public int getStage()Return the current processing stage.- Returns:
- the stage
-
setStage
public void setStage(int stage) Set the current processing stage.- Parameters:
stage- the stage
-
getBytesSent
public long getBytesSent()Return the total bytes sent.- Returns:
- the bytes sent
-
setBytesSent
public void setBytesSent(long bytesSent) Reset the bytes sent.- Parameters:
bytesSent- the new bytes sent
-
getBytesReceived
public long getBytesReceived()Return the total bytes received.- Returns:
- the bytes received
-
setBytesReceived
public void setBytesReceived(long bytesReceived) Reset the bytes received.- Parameters:
bytesReceived- the new bytes received
-
getProcessingTime
public long getProcessingTime()Return the total processing time.- Returns:
- the processing time
-
setProcessingTime
public void setProcessingTime(long processingTime) Reset the processing time.- Parameters:
processingTime- the new processing time
-
getMaxTime
public long getMaxTime()Return the maximum request processing time.- Returns:
- the maximum time
-
setMaxTime
public void setMaxTime(long maxTime) Reset the maximum time.- Parameters:
maxTime- the new maximum time
-
getMaxRequestUri
Return the URI of the request with the longest processing time.- Returns:
- the maximum request URI
-
setMaxRequestUri
Set the maximum request URI.- Parameters:
maxRequestUri- the maximum request URI
-
getRequestCount
public int getRequestCount()Return the request count.- Returns:
- the request count
-
setRequestCount
public void setRequestCount(int requestCount) Reset the request count.- Parameters:
requestCount- the new request count
-
getErrorCount
public int getErrorCount()Return the error count.- Returns:
- the error count
-
setErrorCount
public void setErrorCount(int errorCount) Reset the error count.- Parameters:
errorCount- the new error count
-
getWorkerThreadName
-
getRpName
-
getLastRequestProcessingTime
public long getLastRequestProcessingTime()Return the processing time of the last request.- Returns:
- the last request processing time
-
setWorkerThreadName
Set the worker thread name.- Parameters:
workerThreadName- the worker thread name
-
setRpName
-
setLastRequestProcessingTime
public void setLastRequestProcessingTime(long lastRequestProcessingTime) Set the last request processing time.- Parameters:
lastRequestProcessingTime- the last request processing time
-
recycleStatistcs
public void recycleStatistcs()Recycle all statistics.
-