KickJava   Java API By Example, From Geeks To Geeks.

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


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 public class JmsProducerProperties extends JmsClientProperties {
21     public static final String JavaDoc TIME_BASED_SENDING = "time"; // Produce messages base on a time interval
22
public static final String JavaDoc COUNT_BASED_SENDING = "count"; // Produce a specific count of messages
23
public static final String JavaDoc DELIVERY_MODE_PERSISTENT = "persistent"; // Persistent message delivery
24
public static final String JavaDoc DELIVERY_MODE_NON_PERSISTENT = "nonpersistent"; // Non-persistent message delivery
25

26     protected String JavaDoc deliveryMode = DELIVERY_MODE_NON_PERSISTENT; // Message delivery mode
27
protected int messageSize = 1024; // Send 1kb messages by default
28
protected long sendCount = 1000000; // Send a million messages by default
29
protected long sendDuration = 5 * 60 * 1000; // Send for 5 mins by default
30
protected String JavaDoc sendType = TIME_BASED_SENDING;
31     protected boolean createNewMsg = false; // If true, create a different message on each send, otherwise reuse.
32

33     public String JavaDoc getDeliveryMode() {
34         return deliveryMode;
35     }
36
37     public void setDeliveryMode(String JavaDoc deliveryMode) {
38         this.deliveryMode = deliveryMode;
39     }
40
41     public int getMessageSize() {
42         return messageSize;
43     }
44
45     public void setMessageSize(int messageSize) {
46         this.messageSize = messageSize;
47     }
48
49     public long getSendCount() {
50         return sendCount;
51     }
52
53     public void setSendCount(long sendCount) {
54         this.sendCount = sendCount;
55     }
56
57     public long getSendDuration() {
58         return sendDuration;
59     }
60
61     public void setSendDuration(long sendDuration) {
62         this.sendDuration = sendDuration;
63     }
64
65     public String JavaDoc getSendType() {
66         return sendType;
67     }
68
69     public void setSendType(String JavaDoc sendType) {
70         this.sendType = sendType;
71     }
72
73     public boolean isCreateNewMsg() {
74         return createNewMsg;
75     }
76
77     public void setCreateNewMsg(boolean createNewMsg) {
78         this.createNewMsg = createNewMsg;
79     }
80 }
81
Popular Tags