Class Statistic

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

public class Statistic extends 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 Details

    • Statistic

      public Statistic()
  • Method Details

    • 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, 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