Aaron, Joe and Others,
     I am attaching WebModuleStats that are available
for an app from tomcat. Should we define another
....TimeStatstic to deal with static time data? The
following  
long getProcessingTime(), 
long getStartupTime(), and
long getTldScanTime()
   fall under this catagory.

Thanks 
Anita


                
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 
package org.apache.geronimo.management.geronimo.stats;

import javax.management.j2ee.statistics.CountStatistic;
import javax.management.j2ee.statistics.TimeStatistic;

public interface WebModuleStats {
    // -----------------------
    //   static data 
    // -----------------------

    /**
     * @return The cumulative processing times of requests by
     * all servlets in this Context
     */
    public long getProcessingTime();

    /**
     * @return The time this context was started.
     */
    public long getStartTime();

    /**
     * @return The time (in milliseconds) it took to 
     * start this context.
     */
    public long getStartupTime();

    public long getTldScanTime();
    
    // -----------------------
    //   Transient data 
    // -----------------------
    /**
     * Gets the time (in seconds) that an expired session had been
     * alive. (count, max, total)
     *
     * @return Time (count, max, total) that an expired session had been
     * alive.
     */
    public TimeStatistic getSessionAliveTime();
    /**
     * Sets the time (in seconds) that an expired session had been
     * alive.
     * @param maxActive
     * @param minTime
     * @param sessionMaxAliveTime
     * @param sessionTotalAliveTime total ? average is available
     */
    public void setSessionAliveTime(int maxActive, int minTime, int sessionMaxAliveTime,
            int sessionTotalAliveTime);

    /** 
     * Returns the total number of sessions created by this manager 
     *
     * @return Total number of sessions created by this manager 
     */
    public CountStatistic getSessionCount();
    
    /** 
     * Gets the number of currently active sessions.
     *
     * @return Number of currently active sessions
     */
    public CountStatistic getActiveSessionCount();
    
    /**
     * Gets the number of sessions that have expired.
     *
     * @return Number of sessions that have expired
     */
    public CountStatistic getExpiredSessionCount();
    
    /**
     * Gets the number of sessions that were not created because the maximum
     * number of active sessions was reached.
     *
     * @return Number of rejected sessions
     */
    public CountStatistic getRejectedSessionCount();

    /**
     * Used by the native implementation 
     */
    
    /** 
     * Sets the total number of sessions created by this manager.
     *
     * @param sessionCounter Total number of sessions created by this manager.
     */
    public void setSessionCount(int sessionCounter);
    
    /** 
     * Sets the number of currently active sessions.
     *
     * @param sessionCounter Number of currently active sessions
     */    
    public void setActiveSessionCount(int activeSessionCount);
 
    /**
     * Sets the number of sessions that have expired.
     *
     * @param expiredSessions Number of sessions that have expired
     */   
    public void setExpiredSessionCount(int expiredSessionCount);
    
    /**
     * Sets the number of sessions that were not created because the maximum
     * number of active sessions was reached.
     *
     * @param rejectedSessions Number of rejected sessions
     */
    public void setRejectedSessionCount(int rejectedSessionCount);

    public void setStartTime();

    public void setLastSampleTime();

}

Reply via email to