KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > monitor > stats > ServletStats


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
26  * Use is subject to license terms.
27  */

28
29 /*
30  * $Id: ServletStats.java,v 1.2 2005/12/25 03:52:24 tcfujii Exp $
31  * $Date: 2005/12/25 03:52:24 $
32  * $Revision: 1.2 $
33  *
34  */

35
36 package com.sun.enterprise.admin.monitor.stats;
37 import javax.management.j2ee.statistics.Stats JavaDoc;
38 import javax.management.j2ee.statistics.CountStatistic JavaDoc;
39 import javax.management.j2ee.statistics.TimeStatistic JavaDoc;
40
41 /**
42  * Defines additional Sun ONE Application Server specific statistics
43  * ServletStats interface.
44  * The ServletStats interface that is defined by JSR77, cannot be used
45  * here, as it is not possible to encapsulate the data pertaining to
46  * the service method in a TimeStatistic. Therefore it becomes necessary
47  * to define our own interface for exposing Servlet Statistics.
48  * @since S1AS8.0
49  */

50 public interface ServletStats extends Stats JavaDoc {
51     
52     /**
53      * Number of requests processed by this servlet.
54      * @return CountStatistic
55      */

56     public CountStatistic JavaDoc getRequestCount();
57     
58     /**
59      * Cumulative Value, indicating the time taken to process the
60      * requests received so far.
61      * @return CountStatistic
62      */

63     public CountStatistic JavaDoc getProcessingTime();
64     
65     /**
66      * Gets the execution time of the servlet's service method.
67      *
68      * This method is identical in functionality to getProcessingTime(),
69      * except that it exposes the execution time of the servlet's service
70      * method under the JSR 77 compliant property name and type.
71      *
72      * @return Execution time of the servlet's service method
73      */

74     public TimeStatistic JavaDoc getServiceTime();
75
76     /**
77      * The maximum processing time of a servlet request
78      * @return CountStatistic
79      */

80     public CountStatistic JavaDoc getMaxTime();
81     
82     /**
83      * The errorCount represents the number of cases where the response
84      * code was >= 400
85      * @return CountStatistic
86      */

87     public CountStatistic JavaDoc getErrorCount();
88     
89 }
90
Popular Tags