Source code: org/activemq/management/JCAConnectionStatsImpl.java
1 /**
2 *
3 * Copyright 2004 Protique Ltd
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 **/
18 package org.activemq.management;
19
20
21 /**
22 * Statistics for a JCA connection
23 *
24 * @version $Revision: 1.1.1.1 $
25 */
26 public class JCAConnectionStatsImpl extends StatsImpl {
27 private String connectionFactory;
28 private String managedConnectionFactory;
29 private TimeStatisticImpl waitTime;
30 private TimeStatisticImpl useTime;
31
32 public JCAConnectionStatsImpl(String connectionFactory, String 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 getConnectionFactory() {
44 return connectionFactory;
45 }
46
47 public String 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 }