com.sun.grizzly.tcp
Class RequestInfo

java.lang.Object
  extended by com.sun.grizzly.tcp.RequestInfo

public class RequestInfo
extends Object

Structure holding the Request and Response objects. It also holds statistical informations about request processing and provide management informations about the requests beeing 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 it's own RequestProcessorMX ). TODO: Request notifications will be registered here.

Author:
Costin Manolache

Constructor Summary
RequestInfo(Request req)
          Constructor
 
Method Summary
 long getBytesReceived()
           
 long getBytesSent()
           
 int getContentLength()
           
 long getCount200()
           
 long getCount2xx()
           
 long getCount302()
           
 long getCount304()
           
 long getCount3xx()
           
 long getCount400()
           
 long getCount401()
           
 long getCount403()
           
 long getCount404()
           
 long getCount4xx()
           
 long getCount503()
           
 long getCount5xx()
           
 long getCountOther()
           
 String getCurrentQueryString()
           
 String getCurrentUri()
           
 int getErrorCount()
           
 RequestGroupInfo getGlobalProcessor()
           
 long getLastRequestCompletionTime()
          Gets the time when the last request was completed.
 String getLastRequestMethod()
          Gets the HTTP method of the last request serviced.
 String getLastRequestURI()
          Gets the URI of the last request serviced.
 String getMaxRequestUri()
           
 long getMaxTime()
           
 String getMethod()
           
 long getProcessingTime()
           
 String getProtocol()
           
 String getRemoteAddr()
           
 long getRequestBytesReceived()
           
 long getRequestBytesSent()
           
 long getRequestCompletionTime()
          Gets the time taken to complete the request associated with this RequestInfo.
 int getRequestCount()
           
 long getRequestProcessingTime()
           
 int getServerPort()
           
 int getStage()
           
 String getVirtualHost()
           
 long getWorkerThreadID()
          Gets the worker thread ID which is processing the request associated with this RequestInfo.
 void reset()
          Resets this RequestInfo.
 void setBytesReceived(long bytesReceived)
           
 void setBytesSent(long bytesSent)
           
 void setCount200(long count200)
           
 void setCount2xx(long count2xx)
           
 void setCount302(long count302)
           
 void setCount304(long count304)
           
 void setCount3xx(long count3xx)
           
 void setCount400(long count400)
           
 void setCount401(long count401)
           
 void setCount403(long count403)
           
 void setCount404(long count404)
           
 void setCount4xx(long count4xx)
           
 void setCount503(long count503)
           
 void setCount5xx(long count5xx)
           
 void setCountOther(long countOther)
           
 void setErrorCount(int errorCount)
           
 void setGlobalProcessor(RequestGroupInfo global)
           
 void setMaxRequestUri(String maxRequestUri)
           
 void setMaxTime(long maxTime)
           
 void setProcessingTime(long processingTime)
           
 void setRequestCompletionTime(long completionTime)
          Sets the time taken to complete the request associated with this RequestInfo.
 void setRequestCount(int requestCount)
           
 void setStage(int stage)
           
 void setWorkerThreadID(long workerThreadID)
          Sets the worker thread ID responsible for processing the request associated with this RequestInfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestInfo

public RequestInfo(Request req)
Constructor

Method Detail

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

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)

getCount2xx

public long getCount2xx()

setCount2xx

public void setCount2xx(long count2xx)

getCount3xx

public long getCount3xx()

setCount3xx

public void setCount3xx(long count3xx)

getCount4xx

public long getCount4xx()

setCount4xx

public void setCount4xx(long count4xx)

getCount5xx

public long getCount5xx()

setCount5xx

public void setCount5xx(long count5xx)

getCountOther

public long getCountOther()

setCountOther

public void setCountOther(long countOther)

getCount200

public long getCount200()

setCount200

public void setCount200(long count200)

getCount302

public long getCount302()

setCount302

public void setCount302(long count302)

getCount304

public long getCount304()

setCount304

public void setCount304(long count304)

getCount400

public long getCount400()

setCount400

public void setCount400(long count400)

getCount401

public long getCount401()

setCount401

public void setCount401(long count401)

getCount403

public long getCount403()

setCount403

public void setCount403(long count403)

getCount404

public long getCount404()

setCount404

public void setCount404(long count404)

getCount503

public long getCount503()

setCount503

public void setCount503(long count503)

getWorkerThreadID

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.

Returns:
The worker thread id

setWorkerThreadID

public void setWorkerThreadID(long workerThreadID)
Sets the worker thread ID responsible for processing the request associated with this RequestInfo.

Parameters:
workerThread - The worker thread is

getRequestCompletionTime

public long getRequestCompletionTime()
Gets the time taken to complete the request associated with this RequestInfo.


setRequestCompletionTime

public void setRequestCompletionTime(long completionTime)
Sets the time taken to complete the request associated with this RequestInfo.


getLastRequestURI

public String getLastRequestURI()
Gets the URI of the last request serviced.

Returns:
The URI of the last request serviced

getLastRequestMethod

public String getLastRequestMethod()
Gets the HTTP method of the last request serviced.

Returns:
The HTTP method of the last request serviced

getLastRequestCompletionTime

public long getLastRequestCompletionTime()
Gets the time when the last request was completed.

Returns:
The time when the last request was completed.

reset

public void reset()
Resets this RequestInfo.



Copyright © 2010 SUN Microsystems. All Rights Reserved.