org.mortbay.jetty.handler
Class AbstractStatisticsHandler

java.lang.Object
  extended by org.mortbay.component.AbstractLifeCycle
      extended by org.mortbay.jetty.handler.AbstractHandler
          extended by org.mortbay.jetty.handler.AbstractHandlerContainer
              extended by org.mortbay.jetty.handler.HandlerWrapper
                  extended by org.mortbay.jetty.handler.AbstractStatisticsHandler
All Implemented Interfaces:
LifeCycle, Handler, HandlerContainer
Direct Known Subclasses:
AtomicStatisticsHandler, StatisticsHandler

public abstract class AbstractStatisticsHandler
extends HandlerWrapper

Version:
$Revision: 5236 $ $Date: 2009-06-17 07:36:08 +1000 (Wed, 17 Jun 2009) $

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.mortbay.component.LifeCycle
LifeCycle.Listener
 
Field Summary
 
Fields inherited from class org.mortbay.jetty.handler.AbstractHandler
_string
 
Fields inherited from class org.mortbay.component.AbstractLifeCycle
_listeners
 
Fields inherited from interface org.mortbay.jetty.Handler
ALL, DEFAULT, ERROR, FORWARD, INCLUDE, REQUEST
 
Constructor Summary
AbstractStatisticsHandler()
           
 
Method Summary
protected  void doStart()
           
abstract  int getRequests()
           
abstract  int getRequestsActive()
           
abstract  int getRequestsActiveMax()
           
abstract  long getRequestTimeAverage()
           
abstract  long getRequestTimeMax()
           
abstract  long getRequestTimeMin()
           
abstract  long getRequestTimeTotal()
           
abstract  int getResponses1xx()
           
abstract  int getResponses2xx()
           
abstract  int getResponses3xx()
           
abstract  int getResponses4xx()
           
abstract  int getResponses5xx()
           
abstract  long getStatsOnMs()
           
abstract  void statsReset()
          Resets the current request statistics.
 
Methods inherited from class org.mortbay.jetty.handler.HandlerWrapper
addHandler, doStop, expandChildren, getHandler, handle, removeHandler, setHandler, setServer
 
Methods inherited from class org.mortbay.jetty.handler.AbstractHandlerContainer
expandHandler, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass
 
Methods inherited from class org.mortbay.jetty.handler.AbstractHandler
destroy, getServer, toString
 
Methods inherited from class org.mortbay.component.AbstractLifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mortbay.component.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 

Constructor Detail

AbstractStatisticsHandler

public AbstractStatisticsHandler()
Method Detail

doStart

protected void doStart()
                throws java.lang.Exception
Overrides:
doStart in class HandlerWrapper
Throws:
java.lang.Exception

statsReset

public abstract void statsReset()
Resets the current request statistics.


getRequests

public abstract int getRequests()
Returns:
the number of requests handled by this handler since statsReset() was last called.

getRequestsActive

public abstract int getRequestsActive()
Returns:
the number of requests currently active. since statsReset() was last called.

getRequestsActiveMax

public abstract int getRequestsActiveMax()
Returns:
the maximum number of active requests since statsReset() was last called.

getResponses1xx

public abstract int getResponses1xx()
Returns:
the number of responses with a 1xx status returned by this context since statsReset() was last called.

getResponses2xx

public abstract int getResponses2xx()
Returns:
the number of responses with a 2xx status returned by this context since statsReset() was last called.

getResponses3xx

public abstract int getResponses3xx()
Returns:
the number of responses with a 3xx status returned by this context since statsReset() was last called.

getResponses4xx

public abstract int getResponses4xx()
Returns:
the number of responses with a 4xx status returned by this context since statsReset() was last called.

getResponses5xx

public abstract int getResponses5xx()
Returns:
the number of responses with a 5xx status returned by this context since statsReset() was last called.

getStatsOnMs

public abstract long getStatsOnMs()
Returns:
the milliseconds since the statistics were started with statsReset().

getRequestTimeMin

public abstract long getRequestTimeMin()
Returns:
the minimum time (in milliseconds) of request handling since statsReset() was last called.

getRequestTimeMax

public abstract long getRequestTimeMax()
Returns:
the maximum time (in milliseconds) of request handling since statsReset() was last called.

getRequestTimeTotal

public abstract long getRequestTimeTotal()
Returns:
the total time (in milliseconds) of requests handling since statsReset() was last called.

getRequestTimeAverage

public abstract long getRequestTimeAverage()
Returns:
the average time (in milliseconds) of request handling since statsReset() was last called.
See Also:
getRequestTimeTotal(), getRequests()


Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.