org.zkoss.zk.ui.util
Class Statistic

java.lang.Object
  extended by org.zkoss.zk.ui.util.Statistic
All Implemented Interfaces:
Monitor

public class Statistic
extends java.lang.Object
implements Monitor

An implementation of Monitor to accumulate statistic data in memory.

It has no effect until you specify it in WEB-INF/zk.xml.

Author:
tomyeh

Constructor Summary
Statistic()
           
 
Method Summary
 void afterUpdate(Desktop desktop)
          Called when an asynchronous updated has been processed.
 void beforeUpdate(Desktop desktop, java.util.List<AuRequest> requests)
          Called when an asynchronous updated is called (and not yet processed).
 void desktopCreated(Desktop desktop)
          Called when a desktop is created.
 void desktopDestroyed(Desktop desktop)
          Called when a desktop is being destroyed.
 int getActiveDesktopCount()
          Returns the number of active desktops.
 int getActiveSessionCount()
          Returns the number of active sessions.
 int getActiveUpdateCount()
          Returns the number of active asynchronous updates.
 double getAverageDesktopCount()
          Returns the average number of desktops being created in an hour.
 double getAverageSessionCount()
          Returns the average number of sessions being created in an hour.
 double getAverageUpdateCount()
          Returns the average number of asynchronous updates being created in an hour.
 long getStartTime()
          Returns when the server (actually, this monitor) started.
 int getTotalDesktopCount()
          Returns the total number of desktops that have been created since the server started.
 int getTotalSessionCount()
          Returns the total number of sessions that have been created since the server started.
 int getTotalUpdateCount()
          Returns the total number of asynchronous updates that have been received since the server started.
 void sessionCreated(Session sess)
          Called when a new session is created.
 void sessionDestroyed(Session sess)
          Called when a session is being destroyed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Statistic

public Statistic()
Method Detail

getStartTime

public long getStartTime()
Returns when the server (actually, this monitor) started.


getTotalSessionCount

public int getTotalSessionCount()
Returns the total number of sessions that have been created since the server started.


getActiveSessionCount

public int getActiveSessionCount()
Returns the number of active sessions.


getAverageSessionCount

public double getAverageSessionCount()
Returns the average number of sessions being created in an hour.


getTotalDesktopCount

public int getTotalDesktopCount()
Returns the total number of desktops that have been created since the server started.


getActiveDesktopCount

public int getActiveDesktopCount()
Returns the number of active desktops.


getAverageDesktopCount

public double getAverageDesktopCount()
Returns the average number of desktops being created in an hour.


getTotalUpdateCount

public int getTotalUpdateCount()
Returns the total number of asynchronous updates that have been received since the server started.


getActiveUpdateCount

public int getActiveUpdateCount()
Returns the number of active asynchronous updates.


getAverageUpdateCount

public double getAverageUpdateCount()
Returns the average number of asynchronous updates being created in an hour.


sessionCreated

public void sessionCreated(Session sess)
Description copied from interface: Monitor
Called when a new session is created.

Specified by:
sessionCreated in interface Monitor
Parameters:
sess - the session being created

sessionDestroyed

public void sessionDestroyed(Session sess)
Description copied from interface: Monitor
Called when a session is being destroyed.

Specified by:
sessionDestroyed in interface Monitor
Parameters:
sess - the session being destroyed

desktopCreated

public void desktopCreated(Desktop desktop)
Description copied from interface: Monitor
Called when a desktop is created.

Specified by:
desktopCreated in interface Monitor
Parameters:
desktop - the desktop being created

desktopDestroyed

public void desktopDestroyed(Desktop desktop)
Description copied from interface: Monitor
Called when a desktop is being destroyed.

Specified by:
desktopDestroyed in interface Monitor
Parameters:
desktop - the desktop being destroyed

beforeUpdate

public void beforeUpdate(Desktop desktop,
                         java.util.List<AuRequest> requests)
Description copied from interface: Monitor
Called when an asynchronous updated is called (and not yet processed).

Specified by:
beforeUpdate in interface Monitor
Parameters:
desktop - the desktop that the update is sent to
requests - a list of AuRequest that are being processed.

afterUpdate

public void afterUpdate(Desktop desktop)
Description copied from interface: Monitor
Called when an asynchronous updated has been processed.

Specified by:
afterUpdate in interface Monitor
Parameters:
desktop - the desktop that the update is sent to


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo