MessagingTestConfigProperties.java
001 /*
002  *
003  * Licensed to the Apache Software Foundation (ASF) under one
004  * or more contributor license agreements.  See the NOTICE file
005  * distributed with this work for additional information
006  * regarding copyright ownership.  The ASF licenses this file
007  * to you under the Apache License, Version 2.0 (the
008  * "License"); you may not use this file except in compliance
009  * with the License.  You may obtain a copy of the License at
010  *
011  *   http://www.apache.org/licenses/LICENSE-2.0
012  *
013  * Unless required by applicable law or agreed to in writing,
014  * software distributed under the License is distributed on an
015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
016  * KIND, either express or implied.  See the License for the
017  * specific language governing permissions and limitations
018  * under the License.
019  *
020  */
021 package org.apache.qpid.test.framework;
022 
023 import org.apache.qpid.junit.extensions.util.ParsedProperties;
024 
025 import javax.jms.Session;
026 
027 import java.util.Properties;
028 
029 /**
030  * MessagingTestConfigProperties defines a set of property names and default values for specifying a messaging topology,
031  * and test parameters for running a messaging test over that topology. A Properties object holding some of these
032  * properties, superimposed onto the defaults, is used to establish test topologies and control test behaviour.
033  *
034  <p/>A complete list of the parameters, default values and comments on their usage is provided here:
035  *
036  <p/><table><caption>Parameters</caption>
037  <tr><th> Parameter        <th> Default  <th> Comments
038  <tr><td> messageSize      <td> 0        <td> Message size in bytes. Not including any headers.
039  <tr><td> destinationName  <td> ping     <td> The root name to use to generate destination names to ping.
040  <tr><td> persistent       <td> false    <td> Determines whether peristent delivery is used.
041  <tr><td> transacted       <td> false    <td> Determines whether messages are sent/received in transactions.
042  <tr><td> broker           <td> tcp://localhost:5672 <td> Determines the broker to connect to.
043  <tr><td> virtualHost      <td> test     <td> Determines the virtual host to send all ping over.
044  <tr><td> rate             <td> 0        <td> The maximum rate (in hertz) to send messages at. 0 means no limit.
045  <tr><td> verbose          <td> false    <td> The verbose flag for debugging. Prints to console on every message.
046  <tr><td> pubsub           <td> false    <td> Whether to ping topics or queues. Uses p2p by default.
047  <tr><td> username         <td> guest    <td> The username to access the broker with.
048  <tr><td> password         <td> guest    <td> The password to access the broker with.
049  <tr><td> selector         <td> null     <td> Not used. Defines a message selector to filter pings with.
050  <tr><td> destinationCount <td> 1        <td> The number of receivers listening to the pings.
051  <tr><td> timeout          <td> 30000    <td> In milliseconds. The timeout to stop waiting for replies.
052  <tr><td> commitBatchSize  <td> 1        <td> The number of messages per transaction in transactional mode.
053  <tr><td> uniqueDests      <td> true     <td> Whether each receivers only listens to one ping destination or all.
054  <tr><td> durableDests     <td> false    <td> Whether or not durable destinations are used.
055  <tr><td> ackMode          <td> AUTO_ACK <td> The message acknowledgement mode. Possible values are:
056  *                                               0 - SESSION_TRANSACTED
057  *                                               1 - AUTO_ACKNOWLEDGE
058  *                                               2 - CLIENT_ACKNOWLEDGE
059  *                                               3 - DUPS_OK_ACKNOWLEDGE
060  *                                               257 - NO_ACKNOWLEDGE
061  *                                               258 - PRE_ACKNOWLEDGE
062  <tr><td> maxPending       <td> 0        <td> The maximum size in bytes, of messages sent but not yet received.
063  *                                              Limits the volume of messages currently buffered on the client
064  *                                              or broker. Can help scale test clients by limiting amount of buffered
065  *                                              data to avoid out of memory errors.
066  </table>
067  *
068  <p><table id="crc"><caption>CRC Card</caption>
069  <tr><th> Responsibilities <th> Collaborations
070  <tr><td> Provide the names and defaults of all test parameters.
071  </table>
072  *
073  * @todo Put a type-safe wrapper around these properties, but continue to store the parameters as properties. This is
074  *       simply to ensure that it is a simple matter to serialize/deserialize string/string pairs onto messages.
075  */
076 public class MessagingTestConfigProperties extends ParsedProperties
077 {
078     // ====================== Connection Properties ==================================
079 
080     /** Holds the name of the default connection configuration. */
081     public static final String CONNECTION_NAME = "broker";
082 
083     /** Holds the name of the property to get the initial context factory name from. */
084     public static final String INITIAL_CONTEXT_FACTORY_PROPNAME = "java.naming.factory.initial";
085 
086     /** Defines the class to use as the initial context factory by default. */
087     public static final String INITIAL_CONTEXT_FACTORY_DEFAULT = "org.apache.qpid.jndi.PropertiesFileInitialContextFactory";
088 
089     /** Holds the name of the property to get the test broker url from. */
090     public static final String BROKER_PROPNAME = "qpid.test.broker";
091 
092     /** Holds the default broker url for the test. */
093     public static final String BROKER_DEFAULT = "vm://:1";
094 
095     /** Holds the name of the property to get the test broker virtual path. */
096     public static final String VIRTUAL_HOST_PROPNAME = "virtualHost";
097 
098     /** Holds the default virtual path for the test. */
099     public static final String VIRTUAL_HOST_DEFAULT = "";
100 
101     /** Holds the name of the property to get the broker access username from. */
102     public static final String USERNAME_PROPNAME = "username";
103 
104     /** Holds the default broker log on username. */
105     public static final String USERNAME_DEFAULT = "guest";
106 
107     /** Holds the name of the property to get the broker access password from. */
108     public static final String PASSWORD_PROPNAME = "password";
109 
110     /** Holds the default broker log on password. */
111     public static final String PASSWORD_DEFAULT = "guest";
112 
113     // ====================== Messaging Topology Properties ==========================
114 
115     /** Holds the name of the property to get the bind publisher procuder flag from. */
116     public static final String PUBLISHER_PRODUCER_BIND_PROPNAME = "publisherProducerBind";
117 
118     /** Holds the default value of the publisher producer flag. */
119     public static final boolean PUBLISHER_PRODUCER_BIND_DEFAULT = true;
120 
121     /** Holds the name of the property to get the bind publisher procuder flag from. */
122     public static final String PUBLISHER_CONSUMER_BIND_PROPNAME = "publisherConsumerBind";
123 
124     /** Holds the default value of the publisher consumer flag. */
125     public static final boolean PUBLISHER_CONSUMER_BIND_DEFAULT = false;
126 
127     /** Holds the name of the property to get the bind receivers procuder flag from. */
128     public static final String RECEIVER_PRODUCER_BIND_PROPNAME = "receiverProducerBind";
129 
130     /** Holds the default value of the receivers producer flag. */
131     public static final boolean RECEIVER_PRODUCER_BIND_DEFAULT = false;
132 
133     /** Holds the name of the property to get the bind receivers procuder flag from. */
134     public static final String RECEIVER_CONSUMER_BIND_PROPNAME = "receiverConsumerBind";
135 
136     /** Holds the default value of the receivers consumer flag. */
137     public static final boolean RECEIVER_CONSUMER_BIND_DEFAULT = true;
138 
139     /** Holds the name of the property to get the publishers consumer active flag from. */
140     public static final String PUBLISHER_CONSUMER_ACTIVE_PROPNAME = "publisherConsumerActive";
141 
142     /** Holds the default value of the publishers consumer active flag. */
143     public static final boolean PUBLISHER_CONSUMER_ACTIVE_DEFAULT = true;
144 
145     /** Holds the name of the property to get the receivers consumer active flag from. */
146     public static final String RECEIVER_CONSUMER_ACTIVE_PROPNAME = "receiverConsumerActive";
147 
148     /** Holds the default value of the receivers consumer active flag. */
149     public static final boolean RECEIVER_CONSUMER_ACTIVE_DEFAULT = true;
150 
151     /** Holds the name of the property to get the destination name root from. */
152     public static final String SEND_DESTINATION_NAME_ROOT_PROPNAME = "sendDestinationRoot";
153 
154     /** Holds the root of the name of the default destination to send to. */
155     public static final String SEND_DESTINATION_NAME_ROOT_DEFAULT = "sendTo";
156 
157     /** Holds the name of the property to get the destination name root from. */
158     public static final String RECEIVE_DESTINATION_NAME_ROOT_PROPNAME = "receiveDestinationRoot";
159 
160     /** Holds the root of the name of the default destination to send to. */
161     public static final String RECEIVE_DESTINATION_NAME_ROOT_DEFAULT = "receiveFrom";
162 
163     /** Holds the name of the proeprty to get the destination count from. */
164     public static final String DESTINATION_COUNT_PROPNAME = "destinationCount";
165 
166     /** Defines the default number of destinations to ping. */
167     public static final int DESTINATION_COUNT_DEFAULT = 1;
168 
169     /** Holds the name of the property to get the p2p or pub/sub messaging mode from. */
170     public static final String PUBSUB_PROPNAME = "pubsub";
171 
172     /** Holds the pub/sub mode default, true means ping a topic, false means ping a queue. */
173     public static final boolean PUBSUB_DEFAULT = false;
174 
175     // ======================  JMS Options and Flags =================================
176 
177     /** Holds the name of the property to get the test delivery mode from. */
178     public static final String PERSISTENT_MODE_PROPNAME = "persistent";
179 
180     /** Holds the message delivery mode to use for the test. */
181     public static final boolean PERSISTENT_MODE_DEFAULT = false;
182 
183     /** Holds the name of the property to get the test transactional mode from. */
184     public static final String TRANSACTED_PUBLISHER_PROPNAME = "transactedPublisher";
185 
186     /** Holds the transactional mode to use for the test. */
187     public static final boolean TRANSACTED_PUBLISHER_DEFAULT = false;
188 
189     /** Holds the name of the property to get the test transactional mode from. */
190     public static final String TRANSACTED_RECEIVER_PROPNAME = "transactedReceiver";
191 
192     /** Holds the transactional mode to use for the test. */
193     public static final boolean TRANSACTED_RECEIVER_DEFAULT = false;
194 
195     /** Holds the name of the property to set the no local flag from. */
196     public static final String NO_LOCAL_PROPNAME = "noLocal";
197 
198     /** Defines the default value of the no local flag to use when consuming messages. */
199     public static final boolean NO_LOCAL_DEFAULT = false;
200 
201     /** Holds the name of the property to get the message acknowledgement mode from. */
202     public static final String ACK_MODE_PROPNAME = "ackMode";
203 
204     /** Defines the default message acknowledgement mode. */
205     public static final int ACK_MODE_DEFAULT = Session.AUTO_ACKNOWLEDGE;
206 
207     /** Holds the name of the property to get the durable subscriptions flag from, when doing pub/sub messaging. */
208     public static final String DURABLE_SUBSCRIPTION_PROPNAME = "durableSubscription";
209 
210     /** Defines the default value of the durable subscriptions flag. */
211     public static final boolean DURABLE_SUBSCRIPTION_DEFAULT = false;
212 
213     // ======================  Qpid/AMQP Options and Flags ================================
214 
215     /** Holds the name of the property to set the exclusive flag from. */
216     public static final String EXCLUSIVE_PROPNAME = "exclusive";
217 
218     /** Defines the default value of the exclusive flag to use when consuming messages. */
219     public static final boolean EXCLUSIVE_DEFAULT = false;
220 
221     /** Holds the name of the property to set the immediate flag from. */
222     public static final String IMMEDIATE_PROPNAME = "immediate";
223 
224     /** Defines the default value of the immediate flag to use when sending messages. */
225     public static final boolean IMMEDIATE_DEFAULT = false;
226 
227     /** Holds the name of the property to set the mandatory flag from. */
228     public static final String MANDATORY_PROPNAME = "mandatory";
229 
230     /** Defines the default value of the mandatory flag to use when sending messages. */
231     public static final boolean MANDATORY_DEFAULT = false;
232 
233     /** Holds the name of the property to get the durable destinations flag from. */
234     public static final String DURABLE_DESTS_PROPNAME = "durableDests";
235 
236     /** Default value for the durable destinations flag. */
237     public static final boolean DURABLE_DESTS_DEFAULT = false;
238 
239     /** Holds the name of the property to set the prefetch size from. */
240     public static final String PREFETCH_PROPNAME = "prefetch";
241 
242     /** Defines the default prefetch size to use when consuming messages. */
243     public static final int PREFETCH_DEFAULT = 100;
244 
245     // ======================  Common Test Parameters ================================
246 
247     /** Holds the name of the property to get the test message size from. */
248     public static final String MESSAGE_SIZE_PROPNAME = "messageSize";
249 
250     /** Used to set up a default message size. */
251     public static final int MESSAGE_SIZE_DEAFULT = 0;
252 
253     /** Holds the name of the property to get the message rate from. */
254     public static final String RATE_PROPNAME = "rate";
255 
256     /** Defines the default rate (in pings per second) to send pings at. 0 means as fast as possible, no restriction. */
257     public static final int RATE_DEFAULT = 0;
258 
259     /** Holds the name of the proeprty to get the. */
260     public static final String SELECTOR_PROPNAME = "selector";
261 
262     /** Holds the default message selector. */
263     public static final String SELECTOR_DEFAULT = "";
264 
265     /** Holds the name of the property to get the waiting timeout for response messages. */
266     public static final String TIMEOUT_PROPNAME = "timeout";
267 
268     /** Default time to wait before assuming that a ping has timed out. */
269     public static final long TIMEOUT_DEFAULT = 30000;
270 
271     /** Holds the name of the property to get the commit batch size from. */
272     public static final String TX_BATCH_SIZE_PROPNAME = "commitBatchSize";
273 
274     /** Defines the default number of pings to send in each transaction when running transactionally. */
275     public static final int TX_BATCH_SIZE_DEFAULT = 1;
276 
277     /** Holds the name of the property to set the maximum amount of pending message data for a producer to hold. */
278     public static final String MAX_PENDING_PROPNAME = "maxPending";
279 
280     /** Defines the default maximum quantity of pending message data to allow producers to hold. */
281     public static final int MAX_PENDING_DEFAULT = 0;
282 
283     /** Holds the name of the property to get the publisher rollback flag from. */
284     public static final String ROLLBACK_PUBLISHER_PROPNAME = "rollbackPublisher";
285 
286     /** Holds the default publisher roll back setting. */
287     public static final boolean ROLLBACK_PUBLISHER_DEFAULT = false;
288 
289     /** Holds the name of the property to get the publisher rollback flag from. */
290     public static final String ROLLBACK_RECEIVER_PROPNAME = "rollbackReceiver";
291 
292     /** Holds the default publisher roll back setting. */
293     public static final boolean ROLLBACK_RECEIVER_DEFAULT = false;
294 
295     // ====================== Options that control the bahviour of the test framework. =========================
296 
297     /** Holds the name of the property to get the behavioural mode of not applicable assertions. */
298     public static final String NOT_APPLICABLE_ASSERTION_PROPNAME = "notApplicableAssertion";
299 
300     /** Holds the default behavioral mode of not applicable assertions, which is logging them as a warning. */
301     public static final String NOT_APPLICABLE_ASSERTION_DEFAULT = "warn";
302 
303     /** Holds the name of the property to get the verbose mode proeprty from. */
304     public static final String VERBOSE_PROPNAME = "verbose";
305 
306     /** Holds the default verbose mode. */
307     public static final boolean VERBOSE_DEFAULT = false;
308 
309     /** Holds the default configuration properties. */
310     public static ParsedProperties defaults = new ParsedProperties();
311 
312     static
313     {
314         defaults.setPropertyIfNull(INITIAL_CONTEXT_FACTORY_PROPNAME, INITIAL_CONTEXT_FACTORY_DEFAULT);
315         defaults.setPropertyIfNull(BROKER_PROPNAME, BROKER_DEFAULT);
316         defaults.setPropertyIfNull(VIRTUAL_HOST_PROPNAME, VIRTUAL_HOST_DEFAULT);
317         defaults.setPropertyIfNull(USERNAME_PROPNAME, USERNAME_DEFAULT);
318         defaults.setPropertyIfNull(PASSWORD_PROPNAME, PASSWORD_DEFAULT);
319 
320         defaults.setPropertyIfNull(PUBLISHER_PRODUCER_BIND_PROPNAME, PUBLISHER_PRODUCER_BIND_DEFAULT);
321         defaults.setPropertyIfNull(PUBLISHER_CONSUMER_BIND_PROPNAME, PUBLISHER_CONSUMER_BIND_DEFAULT);
322         defaults.setPropertyIfNull(RECEIVER_PRODUCER_BIND_PROPNAME, RECEIVER_PRODUCER_BIND_DEFAULT);
323         defaults.setPropertyIfNull(RECEIVER_CONSUMER_BIND_PROPNAME, RECEIVER_CONSUMER_BIND_DEFAULT);
324         defaults.setPropertyIfNull(PUBLISHER_CONSUMER_ACTIVE_PROPNAME, PUBLISHER_CONSUMER_ACTIVE_DEFAULT);
325         defaults.setPropertyIfNull(RECEIVER_CONSUMER_ACTIVE_PROPNAME, RECEIVER_CONSUMER_ACTIVE_DEFAULT);
326         defaults.setPropertyIfNull(SEND_DESTINATION_NAME_ROOT_PROPNAME, SEND_DESTINATION_NAME_ROOT_DEFAULT);
327         defaults.setPropertyIfNull(RECEIVE_DESTINATION_NAME_ROOT_PROPNAME, RECEIVE_DESTINATION_NAME_ROOT_DEFAULT);
328         defaults.setPropertyIfNull(DESTINATION_COUNT_PROPNAME, DESTINATION_COUNT_DEFAULT);
329         defaults.setPropertyIfNull(PUBSUB_PROPNAME, PUBSUB_DEFAULT);
330 
331         defaults.setPropertyIfNull(PERSISTENT_MODE_PROPNAME, PERSISTENT_MODE_DEFAULT);
332         defaults.setPropertyIfNull(TRANSACTED_PUBLISHER_PROPNAME, TRANSACTED_PUBLISHER_DEFAULT);
333         defaults.setPropertyIfNull(TRANSACTED_RECEIVER_PROPNAME, TRANSACTED_RECEIVER_DEFAULT);
334         defaults.setPropertyIfNull(NO_LOCAL_PROPNAME, NO_LOCAL_DEFAULT);
335         defaults.setPropertyIfNull(ACK_MODE_PROPNAME, ACK_MODE_DEFAULT);
336         defaults.setPropertyIfNull(DURABLE_SUBSCRIPTION_PROPNAME, DURABLE_SUBSCRIPTION_DEFAULT);
337 
338         defaults.setPropertyIfNull(EXCLUSIVE_PROPNAME, EXCLUSIVE_DEFAULT);
339         defaults.setPropertyIfNull(IMMEDIATE_PROPNAME, IMMEDIATE_DEFAULT);
340         defaults.setPropertyIfNull(MANDATORY_PROPNAME, MANDATORY_DEFAULT);
341         defaults.setPropertyIfNull(DURABLE_DESTS_PROPNAME, DURABLE_DESTS_DEFAULT);
342         defaults.setPropertyIfNull(PREFETCH_PROPNAME, PREFETCH_DEFAULT);
343 
344         defaults.setPropertyIfNull(MESSAGE_SIZE_PROPNAME, MESSAGE_SIZE_DEAFULT);
345         defaults.setPropertyIfNull(RATE_PROPNAME, RATE_DEFAULT);
346         defaults.setPropertyIfNull(SELECTOR_PROPNAME, SELECTOR_DEFAULT);
347         defaults.setPropertyIfNull(TIMEOUT_PROPNAME, TIMEOUT_DEFAULT);
348         defaults.setPropertyIfNull(TX_BATCH_SIZE_PROPNAME, TX_BATCH_SIZE_DEFAULT);
349         defaults.setPropertyIfNull(MAX_PENDING_PROPNAME, MAX_PENDING_DEFAULT);
350         defaults.setPropertyIfNull(ROLLBACK_PUBLISHER_PROPNAME, ROLLBACK_PUBLISHER_DEFAULT);
351         defaults.setPropertyIfNull(ROLLBACK_RECEIVER_PROPNAME, ROLLBACK_RECEIVER_DEFAULT);
352 
353         defaults.setPropertyIfNull(NOT_APPLICABLE_ASSERTION_PROPNAME, NOT_APPLICABLE_ASSERTION_DEFAULT);
354         defaults.setPropertyIfNull(VERBOSE_PROPNAME, VERBOSE_DEFAULT);
355     }
356 
357     /**
358      * Creates a test configuration based on the defaults.
359      */
360     public MessagingTestConfigProperties()
361     {
362         super(defaults);
363     }
364 
365     /**
366      * Creates a test configuration based on the supplied properties.
367      *
368      @param properties The test configuration.
369      */
370     public MessagingTestConfigProperties(Properties properties)
371     {
372         super(properties);
373     }
374 
375     /**
376      * The size of test messages to send.
377      *
378      @return The size of test messages to send.
379      */
380     public int getMessageSize()
381     {
382         return getPropertyAsInteger(MESSAGE_SIZE_PROPNAME);
383     }
384 
385     /**
386      * Flag to indicate that the publishing producer should be set up to publish to a destination.
387      *
388      @return Flag to indicate that the publishing producer should be set up to publish to a destination.
389      */
390     public boolean getPublisherProducerBind()
391     {
392         return getPropertyAsBoolean(PUBLISHER_PRODUCER_BIND_PROPNAME);
393     }
394 
395     /**
396      * Flag to indicate that the publishing consumer should be set up to receive from a destination.
397      *
398      @return Flag to indicate that the publishing consumer should be set up to receive from a destination.
399      */
400     public boolean getPublisherConsumerBind()
401     {
402         return getPropertyAsBoolean(PUBLISHER_CONSUMER_BIND_PROPNAME);
403     }
404 
405     /**
406      * Flag to indicate that the receiving producer should be set up to publish to a destination.
407      *
408      @return Flag to indicate that the receiving producer should be set up to publish to a destination.
409      */
410     public boolean getReceiverProducerBind()
411     {
412         return getPropertyAsBoolean(RECEIVER_PRODUCER_BIND_PROPNAME);
413     }
414 
415     /**
416      * Flag to indicate that the receiving consumer should be set up to receive from a destination.
417      *
418      @return Flag to indicate that the receiving consumer should be set up to receive from a destination.
419      */
420     public boolean getReceiverConsumerBind()
421     {
422         return getPropertyAsBoolean(RECEIVER_CONSUMER_BIND_PROPNAME);
423     }
424 
425     /**
426      * Flag to indicate that the publishing consumer should be created and actively listening.
427      *
428      @return Flag to indicate that the publishing consumer should be created.
429      */
430     public boolean getPublisherConsumerActive()
431     {
432         return getPropertyAsBoolean(PUBLISHER_CONSUMER_ACTIVE_PROPNAME);
433     }
434 
435     /**
436      * Flag to indicate that the receiving consumers should be created and actively listening.
437      *
438      @return Flag to indicate that the receiving consumers should be created and actively listening.
439      */
440     public boolean getReceiverConsumerActive()
441     {
442         return getPropertyAsBoolean(RECEIVER_CONSUMER_ACTIVE_PROPNAME);
443     }
444 
445     /**
446      * A root to create all test destination names from.
447      *
448      @return A root to create all test destination names from.
449      */
450     public String getSendDestinationNameRoot()
451     {
452         return getProperty(SEND_DESTINATION_NAME_ROOT_PROPNAME);
453     }
454 
455     /**
456      * A root to create all receiving destination names from.
457      *
458      @return A root to create all receiving destination names from.
459      */
460     public String getReceiveDestinationNameRoot()
461     {
462         return getProperty(RECEIVE_DESTINATION_NAME_ROOT_PROPNAME);
463     }
464 
465     /**
466      * Flag to indicate that persistent messages should be used.
467      *
468      @return Flag to indicate that persistent messages should be used.
469      */
470     public boolean getPersistentMode()
471     {
472         return getPropertyAsBoolean(PERSISTENT_MODE_PROPNAME);
473     }
474 
475     /**
476      * Flag to indicate that transactional messages should be sent by the publisher.
477      *
478      @return Flag to indicate that transactional messages should be sent by the publisher.
479      */
480     public boolean getPublisherTransacted()
481     {
482         return getPropertyAsBoolean(TRANSACTED_PUBLISHER_PROPNAME);
483     }
484 
485     /**
486      * Flag to indicate that transactional receives should be used by the receiver.
487      *
488      @return Flag to indicate that transactional receives should be used by the receiver.
489      */
490     public boolean getReceiverTransacted()
491     {
492         return getPropertyAsBoolean(TRANSACTED_PUBLISHER_PROPNAME);
493     }
494 
495     /**
496      * The name of the virtual host to run all tests over.
497      *
498      @return The name of the virtual host to run all tests over.
499      */
500     public String getVirtualHost()
501     {
502         return getProperty(VIRTUAL_HOST_PROPNAME);
503     }
504 
505     /**
506      * Limiting rate for each sender in messages per second, or zero for unlimited.
507      *
508      @return Limiting rate for each sender in messages per second, or zero for unlimited.
509      */
510     public String getRate()
511     {
512         return getProperty(RATE_PROPNAME);
513     }
514 
515     /**
516      * Flag to indicate that test messages should be received publish/subscribe style by all receivers.
517      *
518      @return Flag to indicate that test messages should be received publish/subscribe style by all receivers.
519      */
520     public boolean getPubsub()
521     {
522         return getPropertyAsBoolean(PUBSUB_PROPNAME);
523     }
524 
525     /**
526      * The username credentials to run tests with.
527      *
528      @return The username credentials to run tests with.
529      */
530     public String getUsername()
531     {
532         return getProperty(USERNAME_PROPNAME);
533     }
534 
535     /**
536      * The password credentials to run tests with.
537      *
538      @return The password credentials to run tests with.
539      */
540     public String getPassword()
541     {
542         return getProperty(PASSWORD_PROPNAME);
543     }
544 
545     /**
546      * The timeout duration to fail tests on, should they receive no messages within it.
547      *
548      @return The timeout duration to fail tests on, should they receive no messages within it.
549      */
550     public long getTimeout()
551     {
552         return getPropertyAsLong(TIMEOUT_PROPNAME);
553     }
554 
555     /**
556      * The number of messages to batch into each transaction in transational tests.
557      *
558      @return The number of messages to batch into each transaction in transational tests.
559      */
560     public int getTxBatchSize()
561     {
562         return getPropertyAsInteger(TX_BATCH_SIZE_PROPNAME);
563     }
564 
565     /**
566      * Flag to indicate that tests should use durable destinations.
567      *
568      @return Flag to indicate that tests should use durable destinations.
569      */
570     public boolean getDurableDests()
571     {
572         return getPropertyAsBoolean(DURABLE_DESTS_PROPNAME);
573     }
574 
575     /**
576      * The ack mode for message receivers to use.
577      *
578      @return The ack mode for message receivers to use.
579      */
580     public int getAckMode()
581     {
582         return getPropertyAsInteger(ACK_MODE_PROPNAME);
583     }
584 
585     /**
586      * Flag to indicate that tests should use durable subscriptions.
587      *
588      @return Flag to indicate that tests should use durable subscriptions.
589      */
590     public boolean getDurableSubscription()
591     {
592         return getPropertyAsBoolean(DURABLE_SUBSCRIPTION_PROPNAME);
593     }
594 
595     /**
596      * The maximum amount of in-flight data, in bytes, that tests should send at any time.
597      *
598      @return The maximum amount of in-flight data, in bytes, that tests should send at any time.
599      */
600     public int getMaxPending()
601     {
602         return getPropertyAsInteger(MAX_PENDING_PROPNAME);
603     }
604 
605     /**
606      * The size of the prefetch queue to use.
607      *
608      @return The size of the prefetch queue to use.
609      */
610     public int getPrefetch()
611     {
612         return getPropertyAsInteger(PREFETCH_PROPNAME);
613     }
614 
615     /**
616      * Flag to indicate that subscriptions should be no-local.
617      *
618      @return Flag to indicate that subscriptions should be no-local.
619      */
620     public boolean getNoLocal()
621     {
622         return getPropertyAsBoolean(NO_LOCAL_PROPNAME);
623     }
624 
625     /**
626      * Flag to indicate that subscriptions should be exclusive.
627      *
628      @return Flag to indicate that subscriptions should be exclusive.
629      */
630     public boolean getExclusive()
631     {
632         return getPropertyAsBoolean(EXCLUSIVE_PROPNAME);
633     }
634 
635     /**
636      * Flag to indicate that messages must be delivered immediately.
637      *
638      @return Flag to indicate that messages must be delivered immediately.
639      */
640     public boolean getImmediate()
641     {
642         return getPropertyAsBoolean(IMMEDIATE_PROPNAME);
643     }
644 
645     /**
646      * Flag to indicate that messages must be routable.
647      *
648      @return Flag to indicate that messages must be routable.
649      */
650     public boolean getMandatory()
651     {
652         return getPropertyAsBoolean(MANDATORY_PROPNAME);
653     }
654 
655     /**
656      * Gets the value of a flag to indicate that the publisher should rollback all messages sent.
657      *
658      @return A flag to indicate that the publisher should rollback all messages sent.
659      */
660     public boolean getRollbackPublisher()
661     {
662         return getPropertyAsBoolean(ROLLBACK_PUBLISHER_PROPNAME);
663     }
664 
665     /**
666      * Gets the value of a flag to indicate that the receiver should rollback all messages received, then receive them
667      * again.
668      *
669      @return A flag to indicate that the publisher should rollback all messages received.
670      */
671     public boolean getRollbackReceiver()
672     {
673         return getPropertyAsBoolean(ROLLBACK_RECEIVER_PROPNAME);
674     }
675 
676     /**
677      * Gets the behavioural mode of not applicable assertions. Should be one of 'quiet', 'warn' or 'fail'.
678      *
679      @return The behavioural mode of not applicable assertions.
680      */
681     public String getNotApplicableAssertionMode()
682     {
683         return getProperty(NOT_APPLICABLE_ASSERTION_PROPNAME);
684     }
685 }