Package org.eclipse.jetty.server.handler
Class StatisticsHandler
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
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
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,Graceful
,LifeCycle
@ManagedObject("Request Statistics Gathering")
@Deprecated(since="2021-05-27")
public class StatisticsHandler
extends HandlerWrapper
implements Graceful
Deprecated.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.server.handler.AbstractHandler
AbstractHandler.ErrorDispatchHandler
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Graceful
Graceful.Shutdown
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Deprecated.int
Deprecated.int
Deprecated.int
Deprecated.int
Deprecated.int
Deprecated.int
Deprecated.long
Deprecated.double
Deprecated.double
Deprecated.long
Deprecated.int
Deprecated.int
Deprecated.boolean
Deprecated.int
Deprecated.int
Deprecated.int
Deprecated.long
Deprecated.double
Deprecated.double
Deprecated.long
Deprecated.int
Deprecated.int
Deprecated.int
Deprecated.int
Deprecated.int
Deprecated.long
Deprecated.int
Deprecated.long
Deprecated.void
handle
(String path, Request baseRequest, HttpServletRequest request, HttpServletResponse response) Deprecated.Handle a request.boolean
Deprecated.void
setGracefulShutdownWaitsForRequests
(boolean gracefulShutdownWaitsForRequests) Deprecated.Set whether the graceful shutdown should wait for all requests to complete including async requests which are not currently dispatched, or whether it should only wait for all the actively dispatched requests to complete.shutdown()
Deprecated.void
Deprecated.Resets the current request statistics.Deprecated.toString()
Deprecated.Methods inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
destroy, getHandler, getHandlers, insertHandler, setHandler
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandlerContainer
findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass, setServer
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler
getServer
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeans
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Constructor Details
-
StatisticsHandler
public StatisticsHandler()Deprecated.
-
-
Method Details
-
statsReset
Deprecated.Resets the current request statistics. -
handle
public void handle(String path, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException Deprecated.Description copied from interface:Handler
Handle a request.- Specified by:
handle
in interfaceHandler
- Overrides:
handle
in classHandlerWrapper
- Parameters:
path
- The target of the request - either a URI or a name.baseRequest
- The original unwrapped request object.request
- The request either as theRequest
object or a wrapper of that request. The
method can be used access the Request object if required.HttpConnection.getCurrentConnection()
.getHttpChannel()
.getRequest()
response
- The response as theResponse
object or a wrapper of that request. The
method can be used access the Response object if required.HttpConnection.getCurrentConnection()
.getHttpChannel()
.getResponse()
- Throws:
IOException
- if unable to handle the request or response processingServletException
- if unable to handle the request or response due to underlying servlet issue
-
setGracefulShutdownWaitsForRequests
public void setGracefulShutdownWaitsForRequests(boolean gracefulShutdownWaitsForRequests) Deprecated.Set whether the graceful shutdown should wait for all requests to complete including async requests which are not currently dispatched, or whether it should only wait for all the actively dispatched requests to complete.- Parameters:
gracefulShutdownWaitsForRequests
- true to wait for async requests on graceful shutdown.
-
getGracefulShutdownWaitsForRequests
@ManagedAttribute("if graceful shutdown will wait for all requests") public boolean getGracefulShutdownWaitsForRequests()Deprecated.- Returns:
- whether the graceful shutdown will wait for all requests to complete including async requests which are not currently dispatched, or whether it will only wait for all the actively dispatched requests to complete.
- See Also:
-
getRequests
Deprecated.- Returns:
- the number of requests handled by this handler
since
statsReset()
was last called, excluding active requests - See Also:
-
getRequestsActive
Deprecated.- Returns:
- the number of requests currently active.
since
statsReset()
was last called.
-
getRequestsActiveMax
Deprecated.- Returns:
- the maximum number of active requests
since
statsReset()
was last called.
-
getRequestTimeMax
Deprecated.- Returns:
- the maximum time (in milliseconds) of request handling
since
statsReset()
was last called.
-
getRequestTimeTotal
@ManagedAttribute("total time spend in all request handling (in ms)") public long getRequestTimeTotal()Deprecated.- Returns:
- the total time (in milliseconds) of requests handling
since
statsReset()
was last called.
-
getRequestTimeMean
Deprecated.- Returns:
- the mean time (in milliseconds) of request handling
since
statsReset()
was last called. - See Also:
-
getRequestTimeStdDev
@ManagedAttribute("standard deviation for request handling (in ms)") public double getRequestTimeStdDev()Deprecated.- Returns:
- the standard deviation of time (in milliseconds) of request handling
since
statsReset()
was last called. - See Also:
-
getDispatched
Deprecated.- Returns:
- the number of dispatches seen by this handler
since
statsReset()
was last called, excluding active dispatches
-
getDispatchedActive
Deprecated.- Returns:
- the number of dispatches currently in this handler
since
statsReset()
was last called, including resumed requests
-
getDispatchedActiveMax
@ManagedAttribute("maximum number of active dispatches being handled") public int getDispatchedActiveMax()Deprecated.- Returns:
- the max number of dispatches currently in this handler
since
statsReset()
was last called, including resumed requests
-
getDispatchedTimeMax
Deprecated.- Returns:
- the maximum time (in milliseconds) of request dispatch
since
statsReset()
was last called.
-
getDispatchedTimeTotal
@ManagedAttribute("total time spent in dispatch handling (in ms)") public long getDispatchedTimeTotal()Deprecated.- Returns:
- the total time (in milliseconds) of requests handling
since
statsReset()
was last called.
-
getDispatchedTimeMean
@ManagedAttribute("mean time spent in dispatch handling (in ms)") public double getDispatchedTimeMean()Deprecated.- Returns:
- the mean time (in milliseconds) of request handling
since
statsReset()
was last called. - See Also:
-
getDispatchedTimeStdDev
@ManagedAttribute("standard deviation for dispatch handling (in ms)") public double getDispatchedTimeStdDev()Deprecated.- Returns:
- the standard deviation of time (in milliseconds) of request handling
since
statsReset()
was last called. - See Also:
-
getAsyncRequests
Deprecated.- Returns:
- the number of requests handled by this handler
since
statsReset()
was last called, including resumed requests - See Also:
-
getAsyncRequestsWaiting
Deprecated.- Returns:
- the number of requests currently suspended.
since
statsReset()
was last called.
-
getAsyncRequestsWaitingMax
@ManagedAttribute("maximum number of waiting async requests") public int getAsyncRequestsWaitingMax()Deprecated.- Returns:
- the maximum number of current suspended requests
since
statsReset()
was last called.
-
getAsyncDispatches
@ManagedAttribute("number of requested that have been asynchronously dispatched") public int getAsyncDispatches()Deprecated.- Returns:
- the number of requests that have been asynchronously dispatched
-
getExpires
Deprecated.- Returns:
- the number of requests that expired while suspended.
- See Also:
-
getErrors
Deprecated.- Returns:
- the number of async errors that occurred.
- See Also:
-
getResponses1xx
Deprecated.- Returns:
- the number of responses with a 1xx status returned by this context
since
statsReset()
was last called.
-
getResponses2xx
Deprecated.- Returns:
- the number of responses with a 2xx status returned by this context
since
statsReset()
was last called.
-
getResponses3xx
Deprecated.- Returns:
- the number of responses with a 3xx status returned by this context
since
statsReset()
was last called.
-
getResponses4xx
Deprecated.- Returns:
- the number of responses with a 4xx status returned by this context
since
statsReset()
was last called.
-
getResponses5xx
Deprecated.- Returns:
- the number of responses with a 5xx status returned by this context
since
statsReset()
was last called.
-
getResponsesThrown
@ManagedAttribute("number of requests that threw an exception during handling") public int getResponsesThrown()Deprecated.- Returns:
- the number of requests that threw an exception during handling
since
statsReset()
was last called. These may have resulted in some error responses which were unrecorded by theStatisticsHandler
.
-
getStatsOnMs
Deprecated.- Returns:
- the milliseconds since the statistics were started with
statsReset()
.
-
getResponsesBytesTotal
@ManagedAttribute("total number of bytes across all responses") public long getResponsesBytesTotal()Deprecated.- Returns:
- the total bytes of content sent in responses
-
toStatsHTML
Deprecated. -
shutdown
Deprecated. -
isShutdown
public boolean isShutdown()Deprecated.- Specified by:
isShutdown
in interfaceGraceful
-
toString
Deprecated.- Overrides:
toString
in classAbstractLifeCycle
-