org.eclipse.jetty.server.handler
Class StatisticsHandler
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.server.handler.AbstractHandler
org.eclipse.jetty.server.handler.AbstractHandlerContainer
org.eclipse.jetty.server.handler.HandlerWrapper
org.eclipse.jetty.server.handler.StatisticsHandler
- All Implemented Interfaces:
- Handler, HandlerContainer, LifeCycle
public class StatisticsHandler
- extends HandlerWrapper
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
addLifeCycleListener, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StatisticsHandler
public StatisticsHandler()
statsReset
public void statsReset()
- Resets the current request statistics.
handle
public void handle(java.lang.String path,
Request request,
javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
throws java.io.IOException,
javax.servlet.ServletException
- Description copied from interface:
Handler
- Handle a request.
- Specified by:
handle
in interface Handler
- Overrides:
handle
in class HandlerWrapper
- Parameters:
path
- The target of the request - either a URI or a name.request
- The original unwrapped request object.httpRequest
- 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.httpResponse
- 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.
- Throws:
java.io.IOException
javax.servlet.ServletException
doStart
protected void doStart()
throws java.lang.Exception
- Overrides:
doStart
in class HandlerWrapper
- Throws:
java.lang.Exception
getRequests
public int getRequests()
- Returns:
- the number of requests handled by this handler
since
statsReset()
was last called, including
resumed requests - See Also:
getRequestsResumed()
getRequestsActive
public int getRequestsActive()
- Returns:
- the number of requests currently active.
since
statsReset()
was last called.
getRequestsActiveMax
public int getRequestsActiveMax()
- Returns:
- the maximum number of active requests
since
statsReset()
was last called.
getRequestsResumed
public int getRequestsResumed()
- Returns:
- the number of requests that have been resumed
- See Also:
getRequestsExpired()
getRequestsExpired
public int getRequestsExpired()
- Returns:
- the number of requests that expired while suspended.
- See Also:
getRequestsResumed()
getResponses1xx
public int getResponses1xx()
- Returns:
- the number of responses with a 1xx status returned by this context
since
statsReset()
was last called.
getResponses2xx
public int getResponses2xx()
- Returns:
- the number of responses with a 2xx status returned by this context
since
statsReset()
was last called.
getResponses3xx
public int getResponses3xx()
- Returns:
- the number of responses with a 3xx status returned by this context
since
statsReset()
was last called.
getResponses4xx
public int getResponses4xx()
- Returns:
- the number of responses with a 4xx status returned by this context
since
statsReset()
was last called.
getResponses5xx
public int getResponses5xx()
- Returns:
- the number of responses with a 5xx status returned by this context
since
statsReset()
was last called.
getStatsOnMs
public long getStatsOnMs()
- Returns:
- the milliseconds since the statistics were started with
statsReset()
.
getRequestTimeMin
public long getRequestTimeMin()
- Returns:
- the minimum time (in milliseconds) of request handling
since
statsReset()
was last called.
getRequestTimeMax
public long getRequestTimeMax()
- Returns:
- the maximum time (in milliseconds) of request handling
since
statsReset()
was last called.
getRequestTimeTotal
public long getRequestTimeTotal()
- Returns:
- the total time (in milliseconds) of requests handling
since
statsReset()
was last called.
getRequestTimeAverage
public long getRequestTimeAverage()
- Returns:
- the average time (in milliseconds) of request handling
since
statsReset()
was last called. - See Also:
getRequestTimeTotal()
,
getRequests()
getResponsesBytesTotal
public long getResponsesBytesTotal()
- Returns:
- the total bytes of content sent in responses
getSuspendedTimeMin
public long getSuspendedTimeMin()
- Returns:
- the minimum time (in milliseconds) of request suspension
since
statsReset()
was last called.
getSuspendedTimeTotal
public long getSuspendedTimeTotal()
- Returns:
- the total time (in milliseconds) of request suspension
since
statsReset()
was last called.
Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.