Top Fields Constructors Methods
org.mortbay.jetty.handler

public Class StatisticsHandler

extends AbstractStatisticsHandler
Class Inheritance
Imports
java.io.IOException, javax.servlet.ServletException, javax.servlet.http.HttpServletRequest, .HttpServletResponse, org.mortbay.jetty.HttpConnection, .Response

Field Summary

Modifier and TypeField and Description
private transient long
private transient long
private transient int
private transient int
private transient int
private transient int
private transient int
private transient int
private transient int
private transient int
private transient long
private transient long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
public int
public int
public long
public long
public long
public long
public int
public int
public int
public int
public int
public long
public void
handle(String
The target of the request - either a URI or a name.
target
,
HttpServletRequest
The request either as the Request object or a wrapper of that request. The HttpConnection#getCurrentConnection() method can be used access the Request object if required.
request
,
HttpServletResponse
The response as the Response object or a wrapper of that request. The HttpConnection#getCurrentConnection() method can be used access the Response object if required.
response
,
int
The dispatch mode: REQUEST, FORWARD, INCLUDE, ERROR
dispatch
)

Overrides org.mortbay.jetty.handler.HandlerWrapper.handle.

Implements org.mortbay.jetty.Handler.handle.

Handle a request.
public void
statsReset()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.statsReset.

Resets the current request statistics.
Inherited from org.mortbay.jetty.handler.AbstractStatisticsHandler:
doStart

Field Detail

_maxRequestTimeback to summary
private transient long _maxRequestTime
_minRequestTimeback to summary
private transient long _minRequestTime
_requestsback to summary
private transient int _requests
_requestsActiveback to summary
private transient int _requestsActive
_requestsActiveMaxback to summary
private transient int _requestsActiveMax
_responses1xxback to summary
private transient int _responses1xx
_responses2xxback to summary
private transient int _responses2xx
_responses3xxback to summary
private transient int _responses3xx
_responses4xxback to summary
private transient int _responses4xx
_responses5xxback to summary
private transient int _responses5xx
_statsStartedAtback to summary
private transient long _statsStartedAt
_totalRequestTimeback to summary
private transient long _totalRequestTime

Constructor Detail

StatisticsHandlerback to summary
public StatisticsHandler()

Method Detail

getRequestsback to summary
public int getRequests()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequests.

Returns:int

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequests.

the number of requests handled by this handler since statsReset() was last called.

getRequestsActiveback to summary
public int getRequestsActive()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequestsActive.

Returns:int

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequestsActive.

the number of requests currently active. since statsReset() was last called.

getRequestsActiveMaxback to summary
public int getRequestsActiveMax()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequestsActiveMax.

Returns:int

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequestsActiveMax.

the maximum number of active requests since statsReset() was last called.

getRequestTimeAverageback to summary
public long getRequestTimeAverage()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequestTimeAverage.

Returns:long

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequestTimeAverage.

the average time (in milliseconds) of request handling since statsReset() was last called.

getRequestTimeMaxback to summary
public long getRequestTimeMax()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequestTimeMax.

Returns:long

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequestTimeMax.

the maximum time (in milliseconds) of request handling since statsReset() was last called.

getRequestTimeMinback to summary
public long getRequestTimeMin()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequestTimeMin.

Returns:long

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequestTimeMin.

the minimum time (in milliseconds) of request handling since statsReset() was last called.

getRequestTimeTotalback to summary
public long getRequestTimeTotal()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequestTimeTotal.

Returns:long

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getRequestTimeTotal.

the total time (in milliseconds) of requests handling since statsReset() was last called.

getResponses1xxback to summary
public int getResponses1xx()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getResponses1xx.

Returns:int

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getResponses1xx.

the number of responses with a 1xx status returned by this context since statsReset() was last called.

getResponses2xxback to summary
public int getResponses2xx()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getResponses2xx.

Returns:int

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getResponses2xx.

the number of responses with a 2xx status returned by this context since statsReset() was last called.

getResponses3xxback to summary
public int getResponses3xx()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getResponses3xx.

Returns:int

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getResponses3xx.

the number of responses with a 3xx status returned by this context since statsReset() was last called.

getResponses4xxback to summary
public int getResponses4xx()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getResponses4xx.

Returns:int

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getResponses4xx.

the number of responses with a 4xx status returned by this context since statsReset() was last called.

getResponses5xxback to summary
public int getResponses5xx()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getResponses5xx.

Returns:int

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getResponses5xx.

the number of responses with a 5xx status returned by this context since statsReset() was last called.

getStatsOnMsback to summary
public long getStatsOnMs()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.getStatsOnMs.

Returns:long

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.getStatsOnMs.

the milliseconds since the statistics were started with statsReset().

handleback to summary
public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) throws IOException, ServletException

Overrides org.mortbay.jetty.handler.HandlerWrapper.handle.

Implements org.mortbay.jetty.Handler.handle.

Doc from org.mortbay.jetty.Handler.handle.

Handle a request.

Parameters
target:String

The target of the request - either a URI or a name.

request:HttpServletRequest

The request either as the Request object or a wrapper of that request. The HttpConnection#getCurrentConnection() method can be used access the Request object if required.

response:HttpServletResponse

The response as the Response object or a wrapper of that request. The HttpConnection#getCurrentConnection() method can be used access the Response object if required.

dispatch:int

The dispatch mode: REQUEST, FORWARD, INCLUDE, ERROR

statsResetback to summary
public void statsReset()

Implements abstract org.mortbay.jetty.handler.AbstractStatisticsHandler.statsReset.

Doc from org.mortbay.jetty.handler.AbstractStatisticsHandler.statsReset.

Resets the current request statistics.