1 package org.apache.activemq.maven; 2 3 19 20 21 import org.apache.maven.plugin.AbstractMojo; 22 import org.apache.maven.plugin.MojoExecutionException; 23 import org.apache.activemq.tool.JMSMemtest; 24 25 import javax.jms.JMSException ; 26 27 28 34 public class MemtestMojo 35 extends AbstractMojo { 36 37 41 private String url; 42 43 47 private String topic; 48 49 53 private String connectionCheckpointSize; 54 55 59 private String durable; 60 61 65 private String producerCount; 66 67 71 private String prefetchSize; 72 73 74 78 private String consumerCount; 79 80 84 private String messageCount; 85 86 90 private String messageSize; 91 92 96 private String checkpointInterval; 97 98 102 private String destinationName; 103 104 108 private String reportName; 109 110 114 private String reportDirectory; 115 116 117 118 public void execute() 119 throws MojoExecutionException { 120 121 JMSMemtest.main(createArgument()); 122 } 123 124 125 126 public String [] createArgument() { 127 128 129 String [] options = { 130 "url=" + url, 131 "topic=" + topic, 132 "durable=" + durable, 133 "connectionCheckpointSize=" + connectionCheckpointSize, 134 "producerCount=" + producerCount, 135 "consumerCount=" + consumerCount, 136 "messageCount=" + messageCount, 137 "messageSize=" + messageSize, 138 "checkpointInterval=" + checkpointInterval, 139 "destinationName=" + destinationName, 140 "reportName=" + reportName, 141 "prefetchSize=" + prefetchSize, 142 "reportDirectory=" + reportDirectory, 143 }; 144 return options; 145 } 146 } 147 | Popular Tags |