com.sun.grizzly.http.embed
Class Statistics

java.lang.Object
  extended by com.sun.grizzly.http.embed.Statistics

public class Statistics
extends Object

This class can be used to monitor the GrizzlyWebServer. The statistics available from this class are:

To use this class, just do:


    GrizzlyWebServer ws = new GrizzlyWebServer("/var/www");
    Statistics stats = ws.getStatistic();
    stats.startGatheringStatistics();
    ws.start();
 

Author:
Jeanfrancois Arcand

Constructor Summary
protected Statistics(SelectorThread st)
          Create a Statistic class powered uner the hood by the SelectorThread.
 
Method Summary
 KeepAliveStats getKeepAliveStatistics()
          Return an instance of KeepAliveStats , which gather information about the connection and the keep-alive mechanism.
 RequestGroupInfo getRequestStatistics()
          Return an instance of RequestGroupInfo , which gather information about all the requests made to Grizzly.
 ThreadPoolStatistic getThreadPoolStatistics()
          Return an instance of ThreadPoolStatistic, which gather information about the current thread pool used by Grizzly.
 void startGatheringStatistics()
          Start gathering statistics.
 void stopGatheringStatistics()
          Stop gathering statistics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Statistics

protected Statistics(SelectorThread st)
Create a Statistic class powered uner the hood by the SelectorThread.

Parameters:
st - the SelectorThread
Method Detail

getThreadPoolStatistics

public ThreadPoolStatistic getThreadPoolStatistics()
Return an instance of ThreadPoolStatistic, which gather information about the current thread pool used by Grizzly.

Returns:
an instance of ThreadPoolStatistic, which gather information about the current thread pool used by Grizzly.

getKeepAliveStatistics

public KeepAliveStats getKeepAliveStatistics()
Return an instance of KeepAliveStats , which gather information about the connection and the keep-alive mechanism.

Returns:
an instance of KeepAliveStats , which gather information about the connection and the keep-alive mechanism.

getRequestStatistics

public RequestGroupInfo getRequestStatistics()
Return an instance of RequestGroupInfo , which gather information about all the requests made to Grizzly.

Returns:
an instance of RequestGroupInfo , which gather information about all the requests made to Grizzly.

startGatheringStatistics

public void startGatheringStatistics()
Start gathering statistics.


stopGatheringStatistics

public void stopGatheringStatistics()
Stop gathering statistics.



Copyright © 2012 Oracle Corporation. All Rights Reserved.