KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > web > stats > HTTPListenerStatsImpl


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.enterprise.web.stats;
24
25 import java.util.Hashtable JavaDoc;
26 import java.util.ArrayList JavaDoc;
27 import java.util.logging.Logger JavaDoc;
28 import java.util.logging.Level JavaDoc;
29 import java.text.MessageFormat JavaDoc;
30 import javax.management.ObjectName JavaDoc;
31 import javax.management.MBeanServerFactory JavaDoc;
32 import javax.management.MBeanServer JavaDoc;
33 import javax.management.MalformedObjectNameException JavaDoc;
34 import javax.management.MBeanException JavaDoc;
35 import javax.management.AttributeNotFoundException JavaDoc;
36 import javax.management.InstanceNotFoundException JavaDoc;
37 import javax.management.ReflectionException JavaDoc;
38 import javax.management.j2ee.statistics.CountStatistic JavaDoc;
39 import javax.management.j2ee.statistics.Statistic JavaDoc;
40 import com.sun.logging.LogDomains;
41 import com.sun.enterprise.admin.monitor.stats.HTTPListenerStats;
42 import com.sun.enterprise.admin.monitor.stats.MutableCountStatistic;
43 import com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl;
44 import com.sun.enterprise.admin.monitor.stats.GenericStatsImpl;
45 import com.sun.enterprise.admin.monitor.stats.CountStatisticImpl;
46
47
48 /**
49  * Implementation of the HTTPListenerStats interface
50  * All the methods defined in this interface are serviced by querying
51  * Tomcat's MBeans for ThreadPool or GlobalRequestProcessor
52  * @author Murali Vempaty
53  * @since S1AS8.0
54  * @version 1.0
55  */

56 public class HTTPListenerStatsImpl implements HTTPListenerStats {
57     
58     private static Logger JavaDoc _logger = null;
59
60     private GenericStatsImpl baseStatsImpl;
61
62     private MBeanServer JavaDoc server;
63     private ObjectName JavaDoc tpName; // ObjectName for ThreadPoolMBean
64
private ObjectName JavaDoc grpName; // ObjectName for GlobalRequestProcessor MBean
65
private MutableCountStatistic bytesReceived;
66     private MutableCountStatistic bytesSent;
67     private MutableCountStatistic errorCount;
68     private MutableCountStatistic maxTime;
69     private MutableCountStatistic processingTime;
70     private MutableCountStatistic requestCount;
71     private MutableCountStatistic curThreadCount;
72     private MutableCountStatistic curThreadsBusy;
73     private MutableCountStatistic maxThreads;
74     private MutableCountStatistic maxSpareThreads;
75     private MutableCountStatistic minSpareThreads;
76     private MutableCountStatistic count2xx;
77     private MutableCountStatistic count3xx;
78     private MutableCountStatistic count4xx;
79     private MutableCountStatistic count5xx;
80     private MutableCountStatistic countOther;
81     private MutableCountStatistic count200;
82     private MutableCountStatistic count302;
83     private MutableCountStatistic count304;
84     private MutableCountStatistic count400;
85     private MutableCountStatistic count401;
86     private MutableCountStatistic count403;
87     private MutableCountStatistic count404;
88     private MutableCountStatistic count503;
89     private MutableCountStatistic countOpenConnections;
90     private MutableCountStatistic maxOpenConnections;
91     
92
93     /**
94      * Creates a new instance of HTTPListenerStatsImpl
95      * The ObjectNames of the ThreadPool & GlobalRequestProcessor MBeans
96      * follow the pattern:
97      * <domain>:type=ThreadPool,name=http<port>
98      * <domain>:type=GlobalRequestProcessor,name=http<port>
99      * for example: server:type=ThreadPool,name=http1043
100      *
101      * @param domain domain in which Tomcat's MBeans are registered
102      * This is usually the name of the virtual-server,
103      * to which this listener belongs
104      *
105      * @param port port at which the listener is receiving requests
106      */

107     public HTTPListenerStatsImpl(String JavaDoc domain, int port) {
108         
109         _logger = LogDomains.getLogger(LogDomains.WEB_LOGGER);
110
111         baseStatsImpl = new GenericStatsImpl(
112             com.sun.enterprise.admin.monitor.stats.HTTPListenerStats.class,
113             this);
114         
115         // get an instance of the MBeanServer
116
ArrayList JavaDoc servers = MBeanServerFactory.findMBeanServer(null);
117         if(!servers.isEmpty())
118             server = (MBeanServer JavaDoc)servers.get(0);
119         else
120             server = MBeanServerFactory.createMBeanServer();
121         
122         // construct the ObjectNames of the GlobalRequestProcessor &
123
// ThreadPool MBeans
124
// TODO: use an ObjectNameFactory to construct the ObjectNames
125
// of the MBeans, instead of hardcoding
126
String JavaDoc objNameStr = domain + ":type=Selector,name=http" + port;
127         try {
128             tpName = new ObjectName JavaDoc(objNameStr);
129         } catch (Throwable JavaDoc t) {
130             String JavaDoc msg = _logger.getResourceBundle().getString(
131                                     "webcontainer.objectNameCreationError");
132             msg = MessageFormat.format(msg, new Object JavaDoc[] { objNameStr });
133             _logger.log(Level.SEVERE, msg, t);
134         }
135
136         objNameStr = domain + ":type=GlobalRequestProcessor"
137                 + ",name=http" + port;
138         try {
139             grpName = new ObjectName JavaDoc(objNameStr);
140         } catch (Throwable JavaDoc t) {
141             String JavaDoc msg = _logger.getResourceBundle().getString(
142                                     "webcontainer.objectNameCreationError");
143             msg = MessageFormat.format(msg, new Object JavaDoc[] { objNameStr });
144             _logger.log(Level.SEVERE, msg, t);
145         }
146         
147         // initialize all the MutableStatistic Classes
148
initializeStatistics();
149     }
150     
151     // GlobalRequestProcessor Statistics
152
public CountStatistic JavaDoc getBytesReceived() {
153         bytesReceived.setCount(getBytesReceivedLong());
154         return (CountStatistic JavaDoc)bytesReceived.unmodifiableView();
155     }
156     
157     public CountStatistic JavaDoc getBytesSent() {
158         bytesSent.setCount(getBytesSentLong());
159         return (CountStatistic JavaDoc)bytesSent.unmodifiableView();
160     }
161     
162     public CountStatistic JavaDoc getProcessingTime() {
163         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName, "processingTime");
164         processingTime.setCount(StatsUtil.getLongValue(countObj));
165         return (CountStatistic JavaDoc)processingTime.unmodifiableView();
166     }
167     
168     public CountStatistic JavaDoc getRequestCount() {
169         requestCount.setCount(getRequestCountLong());
170         return (CountStatistic JavaDoc)requestCount.unmodifiableView();
171     }
172     
173     public CountStatistic JavaDoc getErrorCount() {
174         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName, "errorCount");
175         errorCount.setCount(StatsUtil.getLongValue(countObj));
176         return (CountStatistic JavaDoc)errorCount.unmodifiableView();
177     }
178     
179     public CountStatistic JavaDoc getMaxTime() {
180         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName, "maxTime");
181         maxTime.setCount(StatsUtil.getLongValue(countObj));
182         return (CountStatistic JavaDoc)maxTime.unmodifiableView();
183     }
184
185
186     /**
187      * Returns the number of responses with a status code in the 2xx range
188      * sent by the HTTP listener whose statistics are exposed by this
189      * <code>HTTPListenerStats</code>.
190      *
191      * @return Number of responses with a status code in the 2xx range
192      */

193     public CountStatistic JavaDoc getCount2xx() {
194         count2xx.setCount(getCount2xxLong());
195         return (CountStatistic JavaDoc)count2xx.unmodifiableView();
196     }
197
198     /**
199      * Returns the number of responses with a status code in the 3xx range
200      * sent by the HTTP listener whose statistics are exposed by this
201      * <code>HTTPListenerStats</code>.
202      *
203      * @return Number of responses with a status code in the 3xx range
204      */

205     public CountStatistic JavaDoc getCount3xx() {
206         count3xx.setCount(getCount3xxLong());
207         return (CountStatistic JavaDoc)count3xx.unmodifiableView();
208     }
209
210     /**
211      * Returns the number of responses with a status code in the 4xx range
212      * sent by the HTTP listener whose statistics are exposed by this
213      * <code>HTTPListenerStats</code>.
214      *
215      * @return Number of responses with a status code in the 4xx range
216      */

217     public CountStatistic JavaDoc getCount4xx() {
218         count4xx.setCount(getCount4xxLong());
219         return (CountStatistic JavaDoc)count4xx.unmodifiableView();
220     }
221
222     /**
223      * Returns the number of responses with a status code in the 5xx range
224      * sent by the HTTP listener whose statistics are exposed by this
225      * <code>HTTPListenerStats</code>.
226      *
227      * @return Number of responses with a status code in the 5xx range
228      */

229     public CountStatistic JavaDoc getCount5xx() {
230         count5xx.setCount(getCount5xxLong());
231         return (CountStatistic JavaDoc)count5xx.unmodifiableView();
232     }
233
234     /**
235      * Returns the number of responses with a status code outside the 2xx,
236      * 3xx, 4xx, and 5xx range, sent by the HTTP listener whose statistics
237      * are exposed by this <code>HTTPListenerStats</code>.
238      *
239      * @return Number of responses with a status code outside the 2xx, 3xx,
240      * 4xx, and 5xx range
241      */

242     public CountStatistic JavaDoc getCountOther() {
243         countOther.setCount(getCountOtherLong());
244         return (CountStatistic JavaDoc)countOther.unmodifiableView();
245     }
246
247     /**
248      * Returns the number of responses with a status code equal to 200
249      * sent by the HTTP listener whose statistics are exposed by this
250      * <code>HTTPListenerStats</code>.
251      *
252      * @return Number of responses with a status code equal to 200
253      */

254     public CountStatistic JavaDoc getCount200() {
255         count200.setCount(getCount200Long());
256         return (CountStatistic JavaDoc)count200.unmodifiableView();
257     }
258
259     /**
260      * Returns the number of responses with a status code equal to 302
261      * sent by the HTTP listener whose statistics are exposed by this
262      * <code>HTTPListenerStats</code>.
263      *
264      * @return Number of responses with a status code equal to 302
265      */

266     public CountStatistic JavaDoc getCount302() {
267         count302.setCount(getCount302Long());
268         return (CountStatistic JavaDoc)count302.unmodifiableView();
269     }
270
271     /**
272      * Returns the number of responses with a status code equal to 304
273      * sent by the HTTP listener whose statistics are exposed by this
274      * <code>HTTPListenerStats</code>.
275      *
276      * @return Number of responses with a status code equal to 304
277      */

278     public CountStatistic JavaDoc getCount304() {
279         count304.setCount(getCount304Long());
280         return (CountStatistic JavaDoc)count304.unmodifiableView();
281     }
282
283     /**
284      * Returns the number of responses with a status code equal to 400
285      * sent by the HTTP listener whose statistics are exposed by this
286      * <code>HTTPListenerStats</code>.
287      *
288      * @return Number of responses with a status code equal to 400
289      */

290     public CountStatistic JavaDoc getCount400() {
291         count400.setCount(getCount400Long());
292         return (CountStatistic JavaDoc)count400.unmodifiableView();
293     }
294
295     /**
296      * Returns the number of responses with a status code equal to 401
297      * sent by the HTTP listener whose statistics are exposed by this
298      * <code>HTTPListenerStats</code>.
299      *
300      * @return Number of responses with a status code equal to 401
301      */

302     public CountStatistic JavaDoc getCount401() {
303         count401.setCount(getCount401Long());
304         return (CountStatistic JavaDoc)count401.unmodifiableView();
305     }
306
307     /**
308      * Returns the number of responses with a status code equal to 403
309      * sent by the HTTP listener whose statistics are exposed by this
310      * <code>HTTPListenerStats</code>.
311      *
312      * @return Number of responses with a status code equal to 403
313      */

314     public CountStatistic JavaDoc getCount403() {
315         count403.setCount(getCount403Long());
316         return (CountStatistic JavaDoc)count403.unmodifiableView();
317     }
318
319     /**
320      * Returns the number of responses with a status code equal to 404
321      * sent by the HTTP listener whose statistics are exposed by this
322      * <code>HTTPListenerStats</code>.
323      *
324      * @return Number of responses with a status code equal to 404
325      */

326     public CountStatistic JavaDoc getCount404() {
327         count404.setCount(getCount404Long());
328         return (CountStatistic JavaDoc)count404.unmodifiableView();
329     }
330
331     /**
332      * Returns the number of responses with a status code equal to 503
333      * sent by the HTTP listener whose statistics are exposed by this
334      * <code>HTTPListenerStats</code>.
335      *
336      * @return Number of responses with a status code equal to 503
337      */

338     public CountStatistic JavaDoc getCount503() {
339         count503.setCount(getCount503Long());
340         return (CountStatistic JavaDoc)count503.unmodifiableView();
341     }
342
343     /**
344      * Returns the number of open connections managed by the HTTP listener
345      * whose statistics are exposed by this <code>HTTPListenerStats</code>.
346      *
347      * @return Number of open connections
348      */

349     public CountStatistic JavaDoc getCountOpenConnections() {
350         countOpenConnections.setCount(getCountOpenConnectionsLong());
351         return (CountStatistic JavaDoc)countOpenConnections.unmodifiableView();
352     }
353
354     /**
355      * Returns the maximum number of open connections managed by the HTTP
356      * listener whose statistics are exposed by this
357      * <code>HTTPListenerStats</code>.
358      *
359      * @return Maximum number of open connections
360      */

361     public CountStatistic JavaDoc getMaxOpenConnections() {
362         maxOpenConnections.setCount(getMaxOpenConnectionsLong());
363         return (CountStatistic JavaDoc)maxOpenConnections.unmodifiableView();
364     }
365
366     // ThreadPool Statistics
367

368     public CountStatistic JavaDoc getCurrentThreadCount() {
369         Object JavaDoc countObj = StatsUtil.getStatistic(server, tpName,
370                                                  "currentThreadCountStats");
371         curThreadCount.setCount(StatsUtil.getLongValue(countObj));
372         return (CountStatistic JavaDoc)curThreadCount.unmodifiableView();
373     }
374     
375     public CountStatistic JavaDoc getCurrentThreadsBusy() {
376         Object JavaDoc countObj = StatsUtil.getStatistic(server, tpName,
377                                                  "currentThreadsBusyStats");
378         curThreadsBusy.setCount(StatsUtil.getLongValue(countObj));
379         return (CountStatistic JavaDoc)curThreadsBusy.unmodifiableView();
380     }
381     
382     public CountStatistic JavaDoc getMaxSpareThreads() {
383         Object JavaDoc countObj = StatsUtil.getStatistic(server, tpName,
384                                                  "maxSpareThreadsStats");
385         maxSpareThreads.setCount(StatsUtil.getLongValue(countObj));
386         return (CountStatistic JavaDoc)maxSpareThreads.unmodifiableView();
387     }
388     
389     public CountStatistic JavaDoc getMaxThreads() {
390         Object JavaDoc countObj = StatsUtil.getStatistic(server, tpName,
391                                                  "maxThreadsStats");
392         maxThreads.setCount(StatsUtil.getLongValue(countObj));
393         return (CountStatistic JavaDoc)maxThreads.unmodifiableView();
394     }
395     
396     public CountStatistic JavaDoc getMinSpareThreads() {
397         Object JavaDoc countObj = StatsUtil.getStatistic(server, tpName,
398                                                  "minSpareThreadsStats");
399         minSpareThreads.setCount(StatsUtil.getLongValue(countObj));
400         return (CountStatistic JavaDoc)minSpareThreads.unmodifiableView();
401     }
402     
403    /**
404      * This method can be used to retrieve all the Statistics, exposed
405      * by this implementation of Stats
406      * @return Statistic[]
407      */

408     public Statistic JavaDoc[] getStatistics() {
409         return baseStatsImpl.getStatistics();
410     }
411     
412     /**
413      * queries for a Statistic by name.
414      * @return Statistic
415      */

416     public Statistic JavaDoc getStatistic(String JavaDoc str) {
417         return baseStatsImpl.getStatistic(str);
418     }
419     
420     /**
421      * returns an array of names of all the Statistics, that can be
422      * retrieved from this implementation of Stats
423      * @return String[]
424      */

425     public String JavaDoc[] getStatisticNames() {
426         return baseStatsImpl.getStatisticNames();
427     }
428
429
430     /*
431      * Package-protected methods
432      */

433
434     long getBytesReceivedLong() {
435         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
436                                                  "bytesReceived");
437         return StatsUtil.getLongValue(countObj);
438     }
439
440     long getBytesSentLong() {
441         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
442                                                  "bytesSent");
443         return StatsUtil.getLongValue(countObj);
444     }
445
446     long getRequestCountLong() {
447         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
448                                                  "requestCount");
449         return StatsUtil.getLongValue(countObj);
450     }
451
452     long getCountOpenConnectionsLong() {
453         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
454                                                  "countOpenConnections");
455         return StatsUtil.getLongValue(countObj);
456     }
457
458     long getMaxOpenConnectionsLong() {
459         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
460                                                  "maxOpenConnections");
461         return StatsUtil.getLongValue(countObj);
462
463     }
464
465     long getCount2xxLong() {
466         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
467                                                  "count2xx");
468         return StatsUtil.getLongValue(countObj);
469
470     }
471
472     long getCount3xxLong() {
473         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
474                                                  "count3xx");
475         return StatsUtil.getLongValue(countObj);
476     }
477
478     long getCount4xxLong() {
479         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
480                                                  "count4xx");
481         return StatsUtil.getLongValue(countObj);
482     }
483
484     long getCount5xxLong() {
485         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
486                                                  "count5xx");
487         return StatsUtil.getLongValue(countObj);
488     }
489
490     long getCountOtherLong() {
491         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
492                                                  "countOther");
493         return StatsUtil.getLongValue(countObj);
494     }
495
496     long getCount200Long() {
497         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
498                                                  "count200");
499         return StatsUtil.getLongValue(countObj);
500     }
501
502     long getCount302Long() {
503         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
504                                                  "count302");
505         return StatsUtil.getLongValue(countObj);
506     }
507
508     long getCount304Long() {
509         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
510                                                  "count304");
511         return StatsUtil.getLongValue(countObj);
512     }
513
514     long getCount400Long() {
515         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
516                                                  "count400");
517         return StatsUtil.getLongValue(countObj);
518     }
519
520     long getCount401Long() {
521         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
522                                                  "count401");
523         return StatsUtil.getLongValue(countObj);
524     }
525
526     long getCount403Long() {
527         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
528                                                  "count403");
529         return StatsUtil.getLongValue(countObj);
530     }
531
532     long getCount404Long() {
533         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
534                                                  "count404");
535         return StatsUtil.getLongValue(countObj);
536     }
537
538     long getCount503Long() {
539         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
540                                                  "count503");
541         return StatsUtil.getLongValue(countObj);
542     }
543
544
545     /**
546      * Gets the URI of the last request serviced by the HTTP listener
547      * associated with this HTTPListenerStatsImpl.
548      *
549      * @return The URI of the last request serviced
550      */

551     String JavaDoc getLastRequestURI() {
552         return (String JavaDoc) StatsUtil.getStatistic(server, grpName,
553                                                "lastRequestURI");
554     }
555
556     /**
557      * Gets the HTTP method of the last request serviced by the HTTP listener
558      * associated with this HTTPListenerStatsImpl.
559      *
560      * @return The HTTP method of the last request serviced
561      */

562     String JavaDoc getLastRequestMethod() {
563         return (String JavaDoc) StatsUtil.getStatistic(server, grpName,
564                                                "lastRequestMethod");
565     }
566
567     /**
568      * Gets the time (in milliseconds since January 1, 1970, 00:00:00) when
569      * the last request serviced by the HTTP listener associated with this
570      * HTTPListenerStatsImpl was completed.
571      *
572      * @return The time when the last request was completed.
573      */

574     long getLastRequestCompletionTime() {
575         Object JavaDoc countObj = StatsUtil.getStatistic(server, grpName,
576                                                  "lastRequestCompletionTime");
577         return StatsUtil.getLongValue(countObj);
578     }
579
580
581     /*
582      * Private methods
583      */

584    
585     private void initializeStatistics() {
586         
587         // Initialize the MutableCountStatistic for BytesReceived
588
CountStatistic JavaDoc c = new CountStatisticImpl("BytesReceived");
589         bytesReceived = new MutableCountStatisticImpl(c);
590         
591         // Initialize the MutableCountStatistic for BytesSent
592
c = new CountStatisticImpl("BytesSent");
593         bytesSent = new MutableCountStatisticImpl(c);
594
595         // Initialize the MutableCountStatistic for ErrorCount
596
c = new CountStatisticImpl("ErrorCount");
597         errorCount = new MutableCountStatisticImpl(c);
598         
599         // Initialize the MutableCountStatistic for MaxTime
600
c = new CountStatisticImpl("MaxTime", "milliseconds");
601         maxTime = new MutableCountStatisticImpl(c);
602         
603         // Initialize the MutableCountStatistic for ProcessingTime
604
c = new CountStatisticImpl("ProcessingTime", "milliseconds");
605         processingTime = new MutableCountStatisticImpl(c);
606         
607         // Initialize the MutableCountStatistic for RequestCount
608
c = new CountStatisticImpl("RequestCount");
609         requestCount = new MutableCountStatisticImpl(c);
610
611         // Initialize the MutableCountStatistic for CurrentThreadCount
612
c = new CountStatisticImpl("CurrentThreadCount");
613         curThreadCount = new MutableCountStatisticImpl(c);
614         
615         // Initialize the MutableCountStatistic for CurrentThreadsBusy
616
c = new CountStatisticImpl("CurrentThreadsBusy");
617         curThreadsBusy = new MutableCountStatisticImpl(c);
618
619         // Initialize the MutableCountStatistic for MaxThreads
620
c = new CountStatisticImpl("MaxThreads");
621         maxThreads = new MutableCountStatisticImpl(c);
622         
623         // Initialize the MutableCountStatistic for MaxSpareThreads
624
c = new CountStatisticImpl("MaxSpareThreads");
625         maxSpareThreads = new MutableCountStatisticImpl(c);
626         
627         // Initialize the MutableCountStatistic for MinSpareThreads
628
c = new CountStatisticImpl("MinSpareThreads");
629         minSpareThreads = new MutableCountStatisticImpl(c);
630
631         // Init Count2xx
632
c = new CountStatisticImpl("Count2xx");
633         count2xx = new MutableCountStatisticImpl(c);
634
635         // Init Count3xx
636
c = new CountStatisticImpl("Count3xx");
637         count3xx = new MutableCountStatisticImpl(c);
638
639         // Init Count4xx
640
c = new CountStatisticImpl("Count4xx");
641         count4xx = new MutableCountStatisticImpl(c);
642
643         // Init Count5xx
644
c = new CountStatisticImpl("Count5xx");
645         count5xx = new MutableCountStatisticImpl(c);
646
647         // Init CountOther
648
c = new CountStatisticImpl("CountOther");
649         countOther = new MutableCountStatisticImpl(c);
650
651         // Init Count200
652
c = new CountStatisticImpl("Count200");
653         count200 = new MutableCountStatisticImpl(c);
654
655         // Init Count302
656
c = new CountStatisticImpl("Count302");
657         count302 = new MutableCountStatisticImpl(c);
658
659         // Init Count304
660
c = new CountStatisticImpl("Count304");
661         count304 = new MutableCountStatisticImpl(c);
662
663         // Init Count400
664
c = new CountStatisticImpl("Count400");
665         count400 = new MutableCountStatisticImpl(c);
666
667         // Init Count401
668
c = new CountStatisticImpl("Count401");
669         count401 = new MutableCountStatisticImpl(c);
670
671         // Init Count403
672
c = new CountStatisticImpl("Count403");
673         count403 = new MutableCountStatisticImpl(c);
674
675         // Init Count404
676
c = new CountStatisticImpl("Count404");
677         count404 = new MutableCountStatisticImpl(c);
678
679         // Init Count503
680
c = new CountStatisticImpl("Count503");
681         count503 = new MutableCountStatisticImpl(c);
682
683         // Init CountOpenConnections
684
c = new CountStatisticImpl("CountOpenConnections");
685         countOpenConnections = new MutableCountStatisticImpl(c);
686
687         // Init MaxOpenConnections
688
c = new CountStatisticImpl("MaxOpenConnections");
689         maxOpenConnections = new MutableCountStatisticImpl(c);
690     }
691
692 }
693
Popular Tags