KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > monitor > statistics > HTTPListenerStats


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 package com.sun.appserv.management.monitor.statistics;
24 import javax.management.j2ee.statistics.Stats JavaDoc;
25 import javax.management.j2ee.statistics.CountStatistic JavaDoc;
26
27 /**
28  * A Stats interface to represent the statistical data exposed by an
29  * HTTP Listener. This include data about the GlobalRequestProcessor
30  * and the ThreadPool.
31  * The GlobalRequestProcessor collects data about request processing
32  * from each of the RequestProcessor threads.
33  * @since S1AS8.0
34  * @version 1.0
35  */

36 public interface HTTPListenerStats extends Stats JavaDoc
37 {
38     
39     // GlobalRequestProcessor statistics for the listener
40
// TODO: Consolidate the statistics into Boundary or BoundedRange
41
// statistics, as necessitated. For now, will leave everything
42
// as a CountStatistic
43

44     /**
45      * Cumulative value of the bytesReceived by each of the
46      * RequestProcessors
47      * @return CountStatistic
48      */

49     public CountStatistic JavaDoc getBytesReceived();
50
51     /**
52      * Cumulative value of the bytesSent by each of the
53      * RequestProcessors
54      * @return CountStatistic
55      */

56     public CountStatistic JavaDoc getBytesSent();
57     
58     /**
59      * Cumulative value of the errorCount of each of the
60      * RequestProcessors. The errorCount represents the number of
61      * cases where the response code was >= 400
62      * @return CountStatistic
63      */

64     public CountStatistic JavaDoc getErrorCount();
65     
66     ;
67     
68     
69     /**
70      * @return CountStatistic
71      */

72     public CountStatistic JavaDoc getCount200();
73     public CountStatistic JavaDoc getCount2xx();
74     public CountStatistic JavaDoc getCount302();
75     public CountStatistic JavaDoc getCount304();
76     public CountStatistic JavaDoc getCount3xx();
77     public CountStatistic JavaDoc getCount400();
78     public CountStatistic JavaDoc getCount401();
79     public CountStatistic JavaDoc getCount403();
80     public CountStatistic JavaDoc getCount404();
81     public CountStatistic JavaDoc getCount4xx();
82     public CountStatistic JavaDoc getCount503();
83     public CountStatistic JavaDoc getCount5xx();
84     public CountStatistic JavaDoc getCountOther();
85     
86     
87     
88     public CountStatistic JavaDoc getCountOpenConnections();
89     public CountStatistic JavaDoc getMaxOpenConnections();
90     
91     
92     /**
93      * The longest response time for a request. This is not a
94      * cumulative value, but is the maximum of the response times
95      * for each of the RequestProcessors.
96      * @return CountStatistic
97      */

98     public CountStatistic JavaDoc getMaxTime();
99     
100     /**
101      * Cumulative value of the processing times of each of the
102      * RequestProcessors. The processing time of a RequestProcessor
103      * is the average of request processing times over the request
104      * count.
105      * @return CountStatistic
106      */

107     public CountStatistic JavaDoc getProcessingTime();
108     
109     /**
110      * Cumulative number of the requests processed so far,
111      * by the RequestProcessors.
112      * @return CountStatistic
113      */

114     public CountStatistic JavaDoc getRequestCount();
115     
116     
117     //ThreadPool statistics for the listener
118

119     /**
120      * The number of request processing threads currently in the
121      * thread pool
122      * @return CountStatistic
123      */

124     public CountStatistic JavaDoc getCurrentThreadCount();
125     
126     /**
127      * The number of request processing threads currently in the
128      * thread pool, serving requests.
129      * @return CountStatistic
130      */

131     public CountStatistic JavaDoc getCurrentThreadsBusy();
132     
133     /**
134      * The maximum number of request processing threads that are
135      * created by the listener. It determines the maximum number of
136      * simultaneous requests that can be handled
137      * @return CountStatistic
138      */

139     public CountStatistic JavaDoc getMaxThreads();
140     
141     /**
142      * The maximum number of unused request processing threads that will
143      * be allowed to exist until the thread pool starts stopping the
144      * unnecessary threads.
145      * @return CountStatistic
146      */

147     public CountStatistic JavaDoc getMaxSpareThreads();
148
149     /**
150      * The number of request processing threads that will be created
151      * when this listener is first started.
152      * @return CountStatistic
153      */

154     public CountStatistic JavaDoc getMinSpareThreads();
155     
156 }
157
Popular Tags