org.mortbay.jetty.handler
Class StatisticsHandler
java.lang.Object
org.mortbay.component.AbstractLifeCycle
org.mortbay.jetty.handler.AbstractHandler
org.mortbay.jetty.handler.AbstractHandlerContainer
org.mortbay.jetty.handler.HandlerWrapper
org.mortbay.jetty.handler.AbstractStatisticsHandler
org.mortbay.jetty.handler.StatisticsHandler
- All Implemented Interfaces:
- LifeCycle, Handler, HandlerContainer
public class StatisticsHandler
- extends AbstractStatisticsHandler
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StatisticsHandler
public StatisticsHandler()
handle
public void handle(java.lang.String target,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
int dispatch)
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:
target
- The target of the request - either a URI or a name.request
- 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
- 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
- The dispatch mode: Handler.REQUEST
, Handler.FORWARD
, Handler.INCLUDE
, Handler.ERROR
- Throws:
java.io.IOException
javax.servlet.ServletException
statsReset
public void statsReset()
- Description copied from class:
AbstractStatisticsHandler
- Resets the current request statistics.
- Specified by:
statsReset
in class AbstractStatisticsHandler
getRequests
public int getRequests()
- Specified by:
getRequests
in class AbstractStatisticsHandler
- Returns:
- the number of requests handled by this handler
since
AbstractStatisticsHandler.statsReset()
was last called.
getRequestsActive
public int getRequestsActive()
- Specified by:
getRequestsActive
in class AbstractStatisticsHandler
- Returns:
- the number of requests currently active.
since
AbstractStatisticsHandler.statsReset()
was last called.
getRequestsActiveMax
public int getRequestsActiveMax()
- Specified by:
getRequestsActiveMax
in class AbstractStatisticsHandler
- Returns:
- the maximum number of active requests
since
AbstractStatisticsHandler.statsReset()
was last called.
getResponses1xx
public int getResponses1xx()
- Specified by:
getResponses1xx
in class AbstractStatisticsHandler
- Returns:
- the number of responses with a 1xx status returned by this context
since
AbstractStatisticsHandler.statsReset()
was last called.
getResponses2xx
public int getResponses2xx()
- Specified by:
getResponses2xx
in class AbstractStatisticsHandler
- Returns:
- the number of responses with a 2xx status returned by this context
since
AbstractStatisticsHandler.statsReset()
was last called.
getResponses3xx
public int getResponses3xx()
- Specified by:
getResponses3xx
in class AbstractStatisticsHandler
- Returns:
- the number of responses with a 3xx status returned by this context
since
AbstractStatisticsHandler.statsReset()
was last called.
getResponses4xx
public int getResponses4xx()
- Specified by:
getResponses4xx
in class AbstractStatisticsHandler
- Returns:
- the number of responses with a 4xx status returned by this context
since
AbstractStatisticsHandler.statsReset()
was last called.
getResponses5xx
public int getResponses5xx()
- Specified by:
getResponses5xx
in class AbstractStatisticsHandler
- Returns:
- the number of responses with a 5xx status returned by this context
since
AbstractStatisticsHandler.statsReset()
was last called.
getStatsOnMs
public long getStatsOnMs()
- Specified by:
getStatsOnMs
in class AbstractStatisticsHandler
- Returns:
- the milliseconds since the statistics were started with
AbstractStatisticsHandler.statsReset()
.
getRequestTimeMin
public long getRequestTimeMin()
- Specified by:
getRequestTimeMin
in class AbstractStatisticsHandler
- Returns:
- the minimum time (in milliseconds) of request handling
since
AbstractStatisticsHandler.statsReset()
was last called.
getRequestTimeMax
public long getRequestTimeMax()
- Specified by:
getRequestTimeMax
in class AbstractStatisticsHandler
- Returns:
- the maximum time (in milliseconds) of request handling
since
AbstractStatisticsHandler.statsReset()
was last called.
getRequestTimeTotal
public long getRequestTimeTotal()
- Specified by:
getRequestTimeTotal
in class AbstractStatisticsHandler
- Returns:
- the total time (in milliseconds) of requests handling
since
AbstractStatisticsHandler.statsReset()
was last called.
getRequestTimeAverage
public long getRequestTimeAverage()
- Specified by:
getRequestTimeAverage
in class AbstractStatisticsHandler
- Returns:
- the average time (in milliseconds) of request handling
since
AbstractStatisticsHandler.statsReset()
was last called. - See Also:
AbstractStatisticsHandler.getRequestTimeTotal()
,
AbstractStatisticsHandler.getRequests()
Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.