KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > activemq > management > JCAConnectionStatsImpl


1 /**
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one or more
4  * contributor license agreements. See the NOTICE file distributed with
5  * this work for additional information regarding copyright ownership.
6  * The ASF licenses this file to You under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with
8  * the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18 package org.apache.activemq.management;
19
20
21 /**
22  * Statistics for a JCA connection
23  *
24  * @version $Revision: 1.2 $
25  */

26 public class JCAConnectionStatsImpl extends StatsImpl {
27     private String JavaDoc connectionFactory;
28     private String JavaDoc managedConnectionFactory;
29     private TimeStatisticImpl waitTime;
30     private TimeStatisticImpl useTime;
31
32     public JCAConnectionStatsImpl(String JavaDoc connectionFactory, String JavaDoc managedConnectionFactory, TimeStatisticImpl waitTime, TimeStatisticImpl useTime) {
33         this.connectionFactory = connectionFactory;
34         this.managedConnectionFactory = managedConnectionFactory;
35         this.waitTime = waitTime;
36         this.useTime = useTime;
37
38         // lets add named stats
39
addStatistic("waitTime", waitTime);
40         addStatistic("useTime", useTime);
41     }
42
43     public String JavaDoc getConnectionFactory() {
44         return connectionFactory;
45     }
46
47     public String JavaDoc getManagedConnectionFactory() {
48         return managedConnectionFactory;
49     }
50
51     public TimeStatisticImpl getWaitTime() {
52         return waitTime;
53     }
54
55     public TimeStatisticImpl getUseTime() {
56         return useTime;
57     }
58
59 }
60
Popular Tags