@ManagedObject(value="Request Statistics Gathering") public class StatisticsHandler extends HandlerWrapper implements Graceful
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
Container.InheritedListener, Container.Listener
_handler
Constructor and Description |
---|
StatisticsHandler() |
destroy, expandChildren, getHandler, getHandlers, setHandler, setServer
expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass
dumpThis, getServer
addBean, addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
@ManagedOperation(value="resets statistics", impact="ACTION") public void statsReset()
public void handle(String path, Request request, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException
Handler
handle
in interface Handler
handle
in class HandlerWrapper
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 HttpChannel.getCurrentHttpChannel()
method can be used access the Request object if required.httpResponse
- The response as the Response
object or a wrapper of that request. The HttpChannel.getCurrentHttpChannel()
method can be used access the Response object if required.IOException
ServletException
protected void updateResponse(Request request)
protected void doStart() throws Exception
ContainerLifeCycle
doStart
in class AbstractHandler
Exception
protected void doStop() throws Exception
ContainerLifeCycle
doStop
in class AbstractHandler
Exception
@ManagedAttribute(value="number of requests") public int getRequests()
statsReset()
was last called, excluding
active requestsgetAsyncDispatches()
@ManagedAttribute(value="number of requests currently active") public int getRequestsActive()
statsReset()
was last called.@ManagedAttribute(value="maximum number of active requests") public int getRequestsActiveMax()
statsReset()
was last called.@ManagedAttribute(value="maximum time spend handling requests (in ms)") public long getRequestTimeMax()
statsReset()
was last called.@ManagedAttribute(value="total time spend in all request handling (in ms)") public long getRequestTimeTotal()
statsReset()
was last called.@ManagedAttribute(value="mean time spent handling requests (in ms)") public double getRequestTimeMean()
statsReset()
was last called.getRequestTimeTotal()
,
getRequests()
@ManagedAttribute(value="standard deviation for request handling (in ms)") public double getRequestTimeStdDev()
statsReset()
was last called.getRequestTimeTotal()
,
getRequests()
@ManagedAttribute(value="number of dispatches") public int getDispatched()
statsReset()
was last called, excluding
active dispatches@ManagedAttribute(value="number of dispatches currently active") public int getDispatchedActive()
statsReset()
was last called, including
resumed requests@ManagedAttribute(value="maximum number of active dispatches being handled") public int getDispatchedActiveMax()
statsReset()
was last called, including
resumed requests@ManagedAttribute(value="maximum time spend in dispatch handling") public long getDispatchedTimeMax()
statsReset()
was last called.@ManagedAttribute(value="total time spent in dispatch handling (in ms)") public long getDispatchedTimeTotal()
statsReset()
was last called.@ManagedAttribute(value="mean time spent in dispatch handling (in ms)") public double getDispatchedTimeMean()
statsReset()
was last called.getRequestTimeTotal()
,
getRequests()
@ManagedAttribute(value="standard deviation for dispatch handling (in ms)") public double getDispatchedTimeStdDev()
statsReset()
was last called.getRequestTimeTotal()
,
getRequests()
@ManagedAttribute(value="total number of async requests") public int getAsyncRequests()
statsReset()
was last called, including
resumed requestsgetAsyncDispatches()
@ManagedAttribute(value="currently waiting async requests") public int getAsyncRequestsWaiting()
statsReset()
was last called.@ManagedAttribute(value="maximum number of waiting async requests") public int getAsyncRequestsWaitingMax()
statsReset()
was last called.@ManagedAttribute(value="number of requested that have been asynchronously dispatched") public int getAsyncDispatches()
@ManagedAttribute(value="number of async requests requests that have expired") public int getExpires()
getAsyncDispatches()
@ManagedAttribute(value="number of requests with 1xx response status") public int getResponses1xx()
statsReset()
was last called.@ManagedAttribute(value="number of requests with 2xx response status") public int getResponses2xx()
statsReset()
was last called.@ManagedAttribute(value="number of requests with 3xx response status") public int getResponses3xx()
statsReset()
was last called.@ManagedAttribute(value="number of requests with 4xx response status") public int getResponses4xx()
statsReset()
was last called.@ManagedAttribute(value="number of requests with 5xx response status") public int getResponses5xx()
statsReset()
was last called.@ManagedAttribute(value="time in milliseconds stats have been collected for") public long getStatsOnMs()
statsReset()
.@ManagedAttribute(value="total number of bytes across all responses") public long getResponsesBytesTotal()
public String toStatsHTML()
Copyright © 1995-2015 Webtide. All Rights Reserved.