RequestInfo (Apache Tomcat 9.0.111 API Documentation)
Description: declaration: package: org.apache.coyote, class: RequestInfo

# Class RequestInfo

java.lang.Object
org.apache.coyote.RequestInfo

public class RequestInfo extends Object
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
  Constructor
  Description
  `RequestInfo(Request req)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getBytesReceived()`
  `long`
  `getBytesSent()`
  `int`
  `getContentLength()`
  `String`
  `getCurrentQueryString()`
  `String`
  `getCurrentUri()`
  `int`
  `getErrorCount()`
  `RequestGroupInfo`
  `getGlobalProcessor()`
  `long`
  `getLastRequestProcessingTime()`
  `String`
  `getMaxRequestUri()`
  `long`
  `getMaxTime()`
  `String`
  `getMethod()`
  `String`
  `getPeerAddr()`
  `long`
  `getProcessingTime()`
  `String`
  `getProtocol()`
  `String`
  `getRemoteAddr()`
  `String`
  `getRemoteAddrForwarded()`
  Obtain the remote address for this connection as reported by an intermediate proxy (if any).
  `long`
  `getRequestBytesReceived()`
  `long`
  `getRequestBytesSent()`
  `int`
  `getRequestCount()`
  `long`
  `getRequestProcessingTime()`
  `ObjectName`
  `getRpName()`
  `int`
  `getServerPort()`
  `int`
  `getStage()`
  `String`
  `getVirtualHost()`
  `String`
  `getWorkerThreadName()`
  `void`
  `recycleStatistcs()`
  `void`
  `setBytesReceived(long bytesReceived)`
  `void`
  `setBytesSent(long bytesSent)`
  `void`
  `setErrorCount(int errorCount)`
  `void`
  `setGlobalProcessor(RequestGroupInfo global)`
  `void`
  `setLastRequestProcessingTime(long lastRequestProcessingTime)`
  `void`
  `setMaxRequestUri(String maxRequestUri)`
  `void`
  `setMaxTime(long maxTime)`
  `void`
  `setProcessingTime(long processingTime)`
  `void`
  `setRequestCount(int requestCount)`
  `void`
  `setRpName(ObjectName rpName)`
  `void`
  `setStage(int stage)`
  `void`
  `setWorkerThreadName(String workerThreadName)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### RequestInfo

    public RequestInfo(Request req)

- ## Method Details

  - ### getGlobalProcessor

    public RequestGroupInfo getGlobalProcessor()

  - ### setGlobalProcessor

    public void setGlobalProcessor(RequestGroupInfo global)

  - ### getMethod

    public String getMethod()

  - ### getCurrentUri

    public String getCurrentUri()

  - ### getCurrentQueryString

    public String getCurrentQueryString()

  - ### getProtocol

    public String getProtocol()

  - ### getVirtualHost

    public String getVirtualHost()

  - ### getServerPort

    public int getServerPort()

  - ### getRemoteAddr

    public String getRemoteAddr()

  - ### getPeerAddr

    public String getPeerAddr()

  - ### getRemoteAddrForwarded

    public String 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()

  - ### getRequestBytesReceived

    public long getRequestBytesReceived()

  - ### getRequestBytesSent

    public long getRequestBytesSent()

  - ### getRequestProcessingTime

    public long getRequestProcessingTime()

  - ### getStage

    public int getStage()

  - ### setStage

    public void setStage(int stage)

  - ### getBytesSent

    public long getBytesSent()

  - ### setBytesSent

    public void setBytesSent(long bytesSent)

  - ### getBytesReceived

    public long getBytesReceived()

  - ### setBytesReceived

    public void setBytesReceived(long bytesReceived)

  - ### getProcessingTime

    public long getProcessingTime()

  - ### setProcessingTime

    public void setProcessingTime(long processingTime)

  - ### getMaxTime

    public long getMaxTime()

  - ### setMaxTime

    public void setMaxTime(long maxTime)

  - ### getMaxRequestUri

    public String getMaxRequestUri()

  - ### setMaxRequestUri

    public void setMaxRequestUri(String maxRequestUri)

  - ### getRequestCount

    public int getRequestCount()

  - ### setRequestCount

    public void setRequestCount(int requestCount)

  - ### getErrorCount

    public int getErrorCount()

  - ### setErrorCount

    public void setErrorCount(int errorCount)

  - ### getWorkerThreadName

    public String getWorkerThreadName()

  - ### getRpName

    public ObjectName getRpName()

  - ### getLastRequestProcessingTime

    public long getLastRequestProcessingTime()

  - ### setWorkerThreadName

    public void setWorkerThreadName(String workerThreadName)

  - ### setRpName

    public void setRpName(ObjectName rpName)

  - ### setLastRequestProcessingTime

    public void setLastRequestProcessingTime(long lastRequestProcessingTime)

  - ### recycleStatistcs

    public void recycleStatistcs()