001    /**
002     *  Licensed to the Apache Software Foundation (ASF) under one or more
003     *  contributor license agreements.  See the NOTICE file distributed with
004     *  this work for additional information regarding copyright ownership.
005     *  The ASF licenses this file to You under the Apache License, Version 2.0
006     *  (the "License"); you may not use this file except in compliance with
007     *  the License.  You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     *  Unless required by applicable law or agreed to in writing, software
012     *  distributed under the License is distributed on an "AS IS" BASIS,
013     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     *  See the License for the specific language governing permissions and
015     *  limitations under the License.
016     */
017    
018    package org.apache.geronimo.management.geronimo.stats;
019    
020    import javax.management.j2ee.statistics.CountStatistic;
021    import javax.management.j2ee.statistics.Stats;
022    import javax.management.j2ee.statistics.TimeStatistic;
023    
024    /**
025     * @version $Rev: 503417 $ $Date: 2007-02-04 09:48:10 -0500 (Sun, 04 Feb 2007) $
026     * 
027     */
028    public interface WebModuleStats extends Stats {
029        // -----------------------
030        // static data
031        // -----------------------
032    
033        /**
034         * @return The cumulative processing times of requests by all servlets in
035         *         this Context
036         */
037        public CountStatistic getProcessingTime();
038    
039        /**
040         * @return The time this context was started.
041         */
042        // public CountStatistic getStartTime();
043        
044        /**
045         * @return The time (in milliseconds) it took to start this context.
046         */
047        public CountStatistic getStartupTime();
048    
049        /**
050         * Scan the TLD contents of all tag library descriptor files (including
051         * those inside the jars that are 'accesible' to this webapp) and register
052         * any application event listeners found there.
053         * 
054         * @return
055         */
056        public CountStatistic getTldScanTime();
057    
058        // -----------------------
059        // Transient data
060        // -----------------------
061    
062        /**
063         * Gets the time (in seconds) that an expired session had been alive.
064         * (count, max, total)
065         * 
066         * @return Time (count, max, total) that an expired session had been alive.
067         */
068        public TimeStatistic getSessionAliveTime();
069    
070        /**
071         * Returns the total number of sessions created by this manager
072         * 
073         * @return Total number of sessions created by this manager
074         */
075        public CountStatistic getSessionCount();
076    
077        /**
078         * Gets the number of currently active sessions.
079         * 
080         * @return Number of currently active sessions
081         */
082        public CountStatistic getActiveSessionCount();
083    
084        /**
085         * Gets the number of sessions that have expired.
086         * 
087         * @return Number of sessions that have expired
088         */
089        public CountStatistic getExpiredSessionCount();
090    
091        /**
092         * Gets the number of sessions that were not created because the maximum
093         * number of active sessions was reached.
094         * 
095         * @return Number of rejected sessions
096         */
097        public CountStatistic getRejectedSessionCount();
098    
099    }