KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > monitor > stats > 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
24 /*
25  * Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
26  * Use is subject to license terms.
27  */

28
29 /*
30  * $Id: HTTPListenerStats.java,v 1.2 2005/12/25 03:52:14 tcfujii Exp $
31  * $Date: 2005/12/25 03:52:14 $
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
40 /**
41  * A Stats interface to represent the statistical data exposed by an
42  * HTTP Listener. This include data about the GlobalRequestProcessor
43  * and the ThreadPool.
44  * The GlobalRequestProcessor collects data about request processing
45  * from each of the RequestProcessor threads.
46  * @author Murali Vempaty
47  * @since S1AS8.0
48  * @version 1.0
49  */

50 public interface HTTPListenerStats extends Stats JavaDoc {
51     
52     // GlobalRequestProcessor statistics for the listener
53
// TODO: Consolidate the statistics into Boundary or BoundedRange
54
// statistics, as necessitated. For now, will leave everything
55
// as a CountStatistic
56

57     /**
58      * Cumulative value of the bytesReceived by each of the
59      * RequestProcessors
60      * @return CountStatistic
61      */

62     public CountStatistic JavaDoc getBytesReceived();
63
64     /**
65      * Cumulative value of the bytesSent by each of the
66      * RequestProcessors
67      * @return CountStatistic
68      */

69     public CountStatistic JavaDoc getBytesSent();
70     
71     /**
72      * Cumulative value of the errorCount of each of the
73      * RequestProcessors. The errorCount represents the number of
74      * cases where the response code was >= 400
75      * @return CountStatistic
76      */

77     public CountStatistic JavaDoc getErrorCount();
78     
79     /**
80      * The longest response time for a request. This is not a
81      * cumulative value, but is the maximum of the response times
82      * for each of the RequestProcessors.
83      * @return CountStatistic
84      */

85     public CountStatistic JavaDoc getMaxTime();
86     
87     /**
88      * Cumulative value of the processing times of each of the
89      * RequestProcessors. The processing time of a RequestProcessor
90      * is the average of request processing times over the request
91      * count.
92      * @return CountStatistic
93      */

94     public CountStatistic JavaDoc getProcessingTime();
95     
96     /**
97      * Cumulative number of the requests processed so far,
98      * by the RequestProcessors.
99      * @return CountStatistic
100      */

101     public CountStatistic JavaDoc getRequestCount();
102     
103     
104     /**
105      * Returns the number of responses with a status code in the 2xx range
106      * sent by the HTTP listener whose statistics are exposed by this
107      * <code>HTTPListenerStats</code>.
108      *
109      * @return Number of responses with a status code in the 2xx range
110      */

111     public CountStatistic JavaDoc getCount2xx();
112
113
114     /**
115      * Returns the number of responses with a status code in the 3xx range
116      * sent by the HTTP listener whose statistics are exposed by this
117      * <code>HTTPListenerStats</code>.
118      *
119      * @return Number of responses with a status code in the 3xx range
120      */

121     public CountStatistic JavaDoc getCount3xx();
122
123
124     /**
125      * Returns the number of responses with a status code in the 4xx range
126      * sent by the HTTP listener whose statistics are exposed by this
127      * <code>HTTPListenerStats</code>.
128      *
129      * @return Number of responses with a status code in the 4xx range
130      */

131     public CountStatistic JavaDoc getCount4xx();
132
133
134     /**
135      * Returns the number of responses with a status code in the 5xx range
136      * sent by the HTTP listener whose statistics are exposed by this
137      * <code>HTTPListenerStats</code>.
138      *
139      * @return Number of responses with a status code in the 5xx range
140      */

141     public CountStatistic JavaDoc getCount5xx();
142
143
144     /**
145      * Returns the number of responses with a status code outside the 2xx,
146      * 3xx, 4xx, and 5xx range, sent by the HTTP listener whose statistics
147      * are exposed by this <code>HTTPListenerStats</code>.
148      *
149      * @return Number of responses with a status code outside the 2xx, 3xx,
150      * 4xx, and 5xx range
151      */

152     public CountStatistic JavaDoc getCountOther();
153
154
155     /**
156      * Returns the number of responses with a status code equal to 200
157      * sent by the HTTP listener whose statistics are exposed by this
158      * <code>HTTPListenerStats</code>.
159      *
160      * @return Number of responses with a status code equal to 200
161      */

162     public CountStatistic JavaDoc getCount200();
163
164
165     /**
166      * Returns the number of responses with a status code equal to 302
167      * sent by the HTTP listener whose statistics are exposed by this
168      * <code>HTTPListenerStats</code>.
169      *
170      * @return Number of responses with a status code equal to 302
171      */

172     public CountStatistic JavaDoc getCount302();
173
174
175     /**
176      * Returns the number of responses with a status code equal to 304
177      * sent by the HTTP listener whose statistics are exposed by this
178      * <code>HTTPListenerStats</code>.
179      *
180      * @return Number of responses with a status code equal to 304
181      */

182     public CountStatistic JavaDoc getCount304();
183
184
185     /**
186      * Returns the number of responses with a status code equal to 400
187      * sent by the HTTP listener whose statistics are exposed by this
188      * <code>HTTPListenerStats</code>.
189      *
190      * @return Number of responses with a status code equal to 400
191      */

192     public CountStatistic JavaDoc getCount400();
193
194
195     /**
196      * Returns the number of responses with a status code equal to 401
197      * sent by the HTTP listener whose statistics are exposed by this
198      * <code>HTTPListenerStats</code>.
199      *
200      * @return Number of responses with a status code equal to 401
201      */

202     public CountStatistic JavaDoc getCount401();
203
204
205     /**
206      * Returns the number of responses with a status code equal to 403
207      * sent by the HTTP listener whose statistics are exposed by this
208      * <code>HTTPListenerStats</code>.
209      *
210      * @return Number of responses with a status code equal to 403
211      */

212     public CountStatistic JavaDoc getCount403();
213
214
215     /**
216      * Returns the number of responses with a status code equal to 404
217      * sent by the HTTP listener whose statistics are exposed by this
218      * <code>HTTPListenerStats</code>.
219      *
220      * @return Number of responses with a status code equal to 404
221      */

222     public CountStatistic JavaDoc getCount404();
223
224
225     /**
226      * Returns the number of responses with a status code equal to 503
227      * sent by the HTTP listener whose statistics are exposed by this
228      * <code>HTTPListenerStats</code>.
229      *
230      * @return Number of responses with a status code equal to 503
231      */

232     public CountStatistic JavaDoc getCount503();
233
234
235     /**
236      * Returns the number of open connections managed by the HTTP listener
237      * whose statistics are exposed by this <code>HTTPListenerStats</code>.
238      *
239      * @return Number of open connections
240      */

241     public CountStatistic JavaDoc getCountOpenConnections();
242
243
244     /**
245      * Returns the maximum number of open connections managed by the HTTP
246      * listener whose statistics are exposed by this
247      * <code>HTTPListenerStats</code>.
248      *
249      * @return Maximum number of open connections
250      */

251     public CountStatistic JavaDoc getMaxOpenConnections();
252
253
254     // ThreadPool statistics for the listener
255

256     /**
257      * The number of request processing threads currently in the
258      * thread pool
259      * @return CountStatistic
260      */

261     public CountStatistic JavaDoc getCurrentThreadCount();
262     
263     /**
264      * The number of request processing threads currently in the
265      * thread pool, serving requests.
266      * @return CountStatistic
267      */

268     public CountStatistic JavaDoc getCurrentThreadsBusy();
269     
270     /**
271      * The maximum number of request processing threads that are
272      * created by the listener. It determines the maximum number of
273      * simultaneous requests that can be handled
274      * @return CountStatistic
275      */

276     public CountStatistic JavaDoc getMaxThreads();
277     
278     /**
279      * The maximum number of unused request processing threads that will
280      * be allowed to exist until the thread pool starts stopping the
281      * unnecessary threads.
282      * @return CountStatistic
283      */

284     public CountStatistic JavaDoc getMaxSpareThreads();
285
286     /**
287      * The number of request processing threads that will be created
288      * when this listener is first started.
289      * @return CountStatistic
290      */

291     public CountStatistic JavaDoc getMinSpareThreads();
292     
293 }
294
Popular Tags