001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.apache.activemq.tool.properties; 018 019 import java.io.File; 020 021 public class JmsClientSystemProperties extends AbstractObjectProperties { 022 public static final String DEST_DISTRO_ALL = "all"; // Each client will send/receive to all destination; 023 public static final String DEST_DISTRO_EQUAL = "equal"; // Equally divide the number of destinations to the number of clients 024 public static final String DEST_DISTRO_DIVIDE = "divide"; // Divide the destination among the clients, even if some have more destination than others 025 026 public static final String REPORT_VERBOSE = "verbose"; // Report would be generated to the console 027 public static final String REPORT_XML_FILE = "xml"; // Report would be generated to an xml file 028 029 public static final String SAMPLER_TP = "tp"; 030 public static final String SAMPLER_CPU = "cpu"; 031 032 protected File propsConfigFile; 033 034 protected String reportType = REPORT_XML_FILE; 035 protected String reportDir = "./"; 036 protected String reportName; 037 038 protected String samplers = SAMPLER_TP + "," + SAMPLER_CPU; // Start both samplers 039 040 protected String spiClass = "org.apache.activemq.tool.spi.ActiveMQReflectionSPI"; 041 protected String clientPrefix = "JmsClient"; 042 protected int numClients = 1; 043 protected int totalDests = 1; 044 protected String destDistro = DEST_DISTRO_ALL; 045 046 public String getReportType() { 047 return reportType; 048 } 049 050 public void setReportType(String reportType) { 051 this.reportType = reportType; 052 } 053 054 public String getReportDir() { 055 return reportDir; 056 } 057 058 public void setReportDir(String reportDir) { 059 this.reportDir = reportDir; 060 } 061 062 public String getReportName() { 063 return reportName; 064 } 065 066 public void setReportName(String reportName) { 067 this.reportName = reportName; 068 } 069 070 public String getSamplers() { 071 return samplers; 072 } 073 074 public void setSamplers(String samplers) { 075 this.samplers = samplers; 076 } 077 078 public String getSpiClass() { 079 return spiClass; 080 } 081 082 public void setSpiClass(String spiClass) { 083 this.spiClass = spiClass; 084 } 085 086 public String getClientPrefix() { 087 return clientPrefix; 088 } 089 090 public void setClientPrefix(String clientPrefix) { 091 this.clientPrefix = clientPrefix; 092 } 093 094 public int getNumClients() { 095 return numClients; 096 } 097 098 public void setNumClients(int numClients) { 099 this.numClients = numClients; 100 } 101 102 public int getTotalDests() { 103 return totalDests; 104 } 105 106 public void setTotalDests(int totalDests) { 107 this.totalDests = totalDests; 108 } 109 110 public String getDestDistro() { 111 return destDistro; 112 } 113 114 public void setDestDistro(String destDistro) { 115 this.destDistro = destDistro; 116 } 117 118 public String getPropsConfigFile() { 119 return this.propsConfigFile + ""; 120 } 121 122 public void setPropsConfigFile(String propsConfigFile) { 123 this.propsConfigFile = new File(propsConfigFile); 124 } 125 }