KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > activemq > tool > properties > JmsClientSystemProperties


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.tool.properties;
19
20 import java.io.File JavaDoc;
21
22 public class JmsClientSystemProperties extends AbstractObjectProperties {
23     public static final String JavaDoc DEST_DISTRO_ALL = "all"; // Each client will send/receive to all destination;
24
public static final String JavaDoc DEST_DISTRO_EQUAL = "equal"; // Equally divide the number of destinations to the number of clients
25
public static final String JavaDoc DEST_DISTRO_DIVIDE = "divide"; // Divide the destination among the clients, even if some have more destination than others
26

27     public static final String JavaDoc REPORT_VERBOSE = "verbose"; // Report would be generated to the console
28
public static final String JavaDoc REPORT_XML_FILE = "xml"; // Report would be generated to an xml file
29

30     public static final String JavaDoc SAMPLER_TP = "tp";
31     public static final String JavaDoc SAMPLER_CPU = "cpu";
32
33     protected File JavaDoc propsConfigFile = null;
34
35     protected String JavaDoc reportType = REPORT_XML_FILE;
36     protected String JavaDoc reportDir = "./";
37     protected String JavaDoc reportName = null;
38
39     protected String JavaDoc samplers = SAMPLER_TP + "," + SAMPLER_CPU; // Start both samplers
40

41     protected String JavaDoc spiClass = "org.apache.activemq.tool.spi.ActiveMQReflectionSPI";
42     protected String JavaDoc clientPrefix = "JmsClient";
43     protected int numClients = 1;
44     protected int totalDests = 1;
45     protected String JavaDoc destDistro = DEST_DISTRO_ALL;
46
47     public String JavaDoc getReportType() {
48         return reportType;
49     }
50
51     public void setReportType(String JavaDoc reportType) {
52         this.reportType = reportType;
53     }
54
55     public String JavaDoc getReportDir() {
56         return reportDir;
57     }
58
59     public void setReportDir(String JavaDoc reportDir) {
60         this.reportDir = reportDir;
61     }
62
63     public String JavaDoc getReportName() {
64         return reportName;
65     }
66
67     public void setReportName(String JavaDoc reportName) {
68         this.reportName = reportName;
69     }
70
71     public String JavaDoc getSamplers() {
72         return samplers;
73     }
74
75     public void setSamplers(String JavaDoc samplers) {
76         this.samplers = samplers;
77     }
78
79     public String JavaDoc getSpiClass() {
80         return spiClass;
81     }
82
83     public void setSpiClass(String JavaDoc spiClass) {
84         this.spiClass = spiClass;
85     }
86
87     public String JavaDoc getClientPrefix() {
88         return clientPrefix;
89     }
90
91     public void setClientPrefix(String JavaDoc clientPrefix) {
92         this.clientPrefix = clientPrefix;
93     }
94
95     public int getNumClients() {
96         return numClients;
97     }
98
99     public void setNumClients(int numClients) {
100         this.numClients = numClients;
101     }
102
103     public int getTotalDests() {
104         return totalDests;
105     }
106
107     public void setTotalDests(int totalDests) {
108         this.totalDests = totalDests;
109     }
110
111     public String JavaDoc getDestDistro() {
112         return destDistro;
113     }
114
115     public void setDestDistro(String JavaDoc destDistro) {
116         this.destDistro = destDistro;
117     }
118
119     public String JavaDoc getPropsConfigFile() {
120         return this.propsConfigFile + "";
121     }
122
123     public void setPropsConfigFile(String JavaDoc propsConfigFile) {
124         this.propsConfigFile = new File JavaDoc(propsConfigFile);
125     }
126 }
127
Popular Tags