public class StatisticsHandler extends AbstractStatisticsHandler
_string
Constructor and Description |
---|
StatisticsHandler() |
Modifier and Type | Method and Description |
---|---|
int |
getRequests() |
int |
getRequestsActive() |
int |
getRequestsActiveMax() |
long |
getRequestTimeAverage() |
long |
getRequestTimeMax() |
long |
getRequestTimeMin() |
long |
getRequestTimeTotal() |
int |
getResponses1xx() |
int |
getResponses2xx() |
int |
getResponses3xx() |
int |
getResponses4xx() |
int |
getResponses5xx() |
long |
getStatsOnMs() |
void |
handle(String target,
HttpServletRequest request,
HttpServletResponse response,
int dispatch)
Handle a request.
|
void |
statsReset()
Resets the current request statistics.
|
doStart
addHandler, doStop, expandChildren, getHandler, removeHandler, setHandler, setServer
expandHandler, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass
destroy, getServer, toString
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) throws IOException, ServletException
Handler
handle
in interface Handler
handle
in class HandlerWrapper
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
IOException
ServletException
public void statsReset()
AbstractStatisticsHandler
statsReset
in class AbstractStatisticsHandler
public int getRequests()
getRequests
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
was last called.public int getRequestsActive()
getRequestsActive
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
was last called.public int getRequestsActiveMax()
getRequestsActiveMax
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
was last called.public int getResponses1xx()
getResponses1xx
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
was last called.public int getResponses2xx()
getResponses2xx
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
was last called.public int getResponses3xx()
getResponses3xx
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
was last called.public int getResponses4xx()
getResponses4xx
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
was last called.public int getResponses5xx()
getResponses5xx
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
was last called.public long getStatsOnMs()
getStatsOnMs
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
.public long getRequestTimeMin()
getRequestTimeMin
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
was last called.public long getRequestTimeMax()
getRequestTimeMax
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
was last called.public long getRequestTimeTotal()
getRequestTimeTotal
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
was last called.public long getRequestTimeAverage()
getRequestTimeAverage
in class AbstractStatisticsHandler
AbstractStatisticsHandler.statsReset()
was last called.AbstractStatisticsHandler.getRequestTimeTotal()
,
AbstractStatisticsHandler.getRequests()
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.