org.eclipse.jetty.server.handler
Class StatisticsHandler
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AggregateLifeCycle
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, Destroyable, Dumpable, LifeCycle
public class StatisticsHandler
- extends HandlerWrapper
Methods inherited from class org.eclipse.jetty.util.component.AggregateLifeCycle |
addBean, addBean, contains, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanage |
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StatisticsHandler
public StatisticsHandler()
statsReset
public void statsReset()
- Resets the current request statistics.
handle
public void handle(String path,
Request request,
javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
throws 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 AbstractHttpConnection.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 AbstractHttpConnection.getCurrentConnection()
method can be used access the Response object if required.
- Throws:
IOException
javax.servlet.ServletException
doStart
protected void doStart()
throws Exception
- Description copied from class:
AggregateLifeCycle
- Start the managed lifecycle beans in the order they were added.
- Overrides:
doStart
in class HandlerWrapper
- Throws:
Exception
- See Also:
AbstractLifeCycle.doStart()
getRequests
public int getRequests()
- Returns:
- the number of requests handled by this handler
since
statsReset()
was last called, excluding
active requests - See Also:
getResumes()
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.
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.
getRequestTimeMean
public double getRequestTimeMean()
- Returns:
- the mean time (in milliseconds) of request handling
since
statsReset()
was last called. - See Also:
getRequestTimeTotal()
,
getRequests()
getRequestTimeStdDev
public double getRequestTimeStdDev()
- Returns:
- the standard deviation of time (in milliseconds) of request handling
since
statsReset()
was last called. - See Also:
getRequestTimeTotal()
,
getRequests()
getDispatched
public int getDispatched()
- Returns:
- the number of dispatches seen by this handler
since
statsReset()
was last called, excluding
active dispatches
getDispatchedActive
public int getDispatchedActive()
- Returns:
- the number of dispatches currently in this handler
since
statsReset()
was last called, including
resumed requests
getDispatchedActiveMax
public int getDispatchedActiveMax()
- Returns:
- the max number of dispatches currently in this handler
since
statsReset()
was last called, including
resumed requests
getDispatchedTimeMax
public long getDispatchedTimeMax()
- Returns:
- the maximum time (in milliseconds) of request dispatch
since
statsReset()
was last called.
getDispatchedTimeTotal
public long getDispatchedTimeTotal()
- Returns:
- the total time (in milliseconds) of requests handling
since
statsReset()
was last called.
getDispatchedTimeMean
public double getDispatchedTimeMean()
- Returns:
- the mean time (in milliseconds) of request handling
since
statsReset()
was last called. - See Also:
getRequestTimeTotal()
,
getRequests()
getDispatchedTimeStdDev
public double getDispatchedTimeStdDev()
- Returns:
- the standard deviation of time (in milliseconds) of request handling
since
statsReset()
was last called. - See Also:
getRequestTimeTotal()
,
getRequests()
getSuspends
public int getSuspends()
- Returns:
- the number of requests handled by this handler
since
statsReset()
was last called, including
resumed requests - See Also:
getResumes()
getSuspendsActive
public int getSuspendsActive()
- Returns:
- the number of requests currently suspended.
since
statsReset()
was last called.
getSuspendsActiveMax
public int getSuspendsActiveMax()
- Returns:
- the maximum number of current suspended requests
since
statsReset()
was last called.
getResumes
public int getResumes()
- Returns:
- the number of requests that have been resumed
- See Also:
getExpires()
getExpires
public int getExpires()
- Returns:
- the number of requests that expired while suspended.
- See Also:
getResumes()
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()
.
getResponsesBytesTotal
public long getResponsesBytesTotal()
- Returns:
- the total bytes of content sent in responses
toStatsHTML
public String toStatsHTML()
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.