|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
org.apache.qpid.junit.extensions.util.ParsedProperties
org.apache.qpid.test.framework.MessagingTestConfigProperties
public class MessagingTestConfigProperties
MessagingTestConfigProperties defines a set of property names and default values for specifying a messaging topology, and test parameters for running a messaging test over that topology. A Properties object holding some of these properties, superimposed onto the defaults, is used to establish test topologies and control test behaviour.
A complete list of the parameters, default values and comments on their usage is provided here:Parameter | Default | Comments |
---|---|---|
messageSize | 0 | Message size in bytes. Not including any headers. |
destinationName | ping | The root name to use to generate destination names to ping. |
persistent | false | Determines whether peristent delivery is used. |
transacted | false | Determines whether messages are sent/received in transactions. |
broker | tcp://localhost:5672 | Determines the broker to connect to. |
virtualHost | test | Determines the virtual host to send all ping over. |
rate | 0 | The maximum rate (in hertz) to send messages at. 0 means no limit. |
verbose | false | The verbose flag for debugging. Prints to console on every message. |
pubsub | false | Whether to ping topics or queues. Uses p2p by default. |
username | guest | The username to access the broker with. |
password | guest | The password to access the broker with. |
selector | null | Not used. Defines a message selector to filter pings with. |
destinationCount | 1 | The number of receivers listening to the pings. |
timeout | 30000 | In milliseconds. The timeout to stop waiting for replies. |
commitBatchSize | 1 | The number of messages per transaction in transactional mode. |
uniqueDests | true | Whether each receivers only listens to one ping destination or all. |
durableDests | false | Whether or not durable destinations are used. |
ackMode | AUTO_ACK | The message acknowledgement mode. Possible values are: 0 - SESSION_TRANSACTED 1 - AUTO_ACKNOWLEDGE 2 - CLIENT_ACKNOWLEDGE 3 - DUPS_OK_ACKNOWLEDGE 257 - NO_ACKNOWLEDGE 258 - PRE_ACKNOWLEDGE |
maxPending | 0 | The maximum size in bytes, of messages sent but not yet received. Limits the volume of messages currently buffered on the client or broker. Can help scale test clients by limiting amount of buffered data to avoid out of memory errors. |
Responsibilities | Collaborations |
---|---|
Provide the names and defaults of all test parameters. |
Field Summary | |
---|---|
static int |
ACK_MODE_DEFAULT
Defines the default message acknowledgement mode. |
static String |
ACK_MODE_PROPNAME
Holds the name of the property to get the message acknowledgement mode from. |
static String |
BROKER_DEFAULT
Holds the default broker url for the test. |
static String |
BROKER_PROPNAME
Holds the name of the property to get the test broker url from. |
static String |
CONNECTION_NAME
Holds the name of the default connection configuration. |
static org.apache.qpid.junit.extensions.util.ParsedProperties |
defaults
Holds the default configuration properties. |
static int |
DESTINATION_COUNT_DEFAULT
Defines the default number of destinations to ping. |
static String |
DESTINATION_COUNT_PROPNAME
Holds the name of the proeprty to get the destination count from. |
static boolean |
DURABLE_DESTS_DEFAULT
Default value for the durable destinations flag. |
static String |
DURABLE_DESTS_PROPNAME
Holds the name of the property to get the durable destinations flag from. |
static boolean |
DURABLE_SUBSCRIPTION_DEFAULT
Defines the default value of the durable subscriptions flag. |
static String |
DURABLE_SUBSCRIPTION_PROPNAME
Holds the name of the property to get the durable subscriptions flag from, when doing pub/sub messaging. |
static boolean |
EXCLUSIVE_DEFAULT
Defines the default value of the exclusive flag to use when consuming messages. |
static String |
EXCLUSIVE_PROPNAME
Holds the name of the property to set the exclusive flag from. |
static boolean |
IMMEDIATE_DEFAULT
Defines the default value of the immediate flag to use when sending messages. |
static String |
IMMEDIATE_PROPNAME
Holds the name of the property to set the immediate flag from. |
static String |
INITIAL_CONTEXT_FACTORY_DEFAULT
Defines the class to use as the initial context factory by default. |
static String |
INITIAL_CONTEXT_FACTORY_PROPNAME
Holds the name of the property to get the initial context factory name from. |
static boolean |
MANDATORY_DEFAULT
Defines the default value of the mandatory flag to use when sending messages. |
static String |
MANDATORY_PROPNAME
Holds the name of the property to set the mandatory flag from. |
static int |
MAX_PENDING_DEFAULT
Defines the default maximum quantity of pending message data to allow producers to hold. |
static String |
MAX_PENDING_PROPNAME
Holds the name of the property to set the maximum amount of pending message data for a producer to hold. |
static int |
MESSAGE_SIZE_DEAFULT
Used to set up a default message size. |
static String |
MESSAGE_SIZE_PROPNAME
Holds the name of the property to get the test message size from. |
static boolean |
NO_LOCAL_DEFAULT
Defines the default value of the no local flag to use when consuming messages. |
static String |
NO_LOCAL_PROPNAME
Holds the name of the property to set the no local flag from. |
static String |
NOT_APPLICABLE_ASSERTION_DEFAULT
Holds the default behavioral mode of not applicable assertions, which is logging them as a warning. |
static String |
NOT_APPLICABLE_ASSERTION_PROPNAME
Holds the name of the property to get the behavioural mode of not applicable assertions. |
static String |
PASSWORD_DEFAULT
Holds the default broker log on password. |
static String |
PASSWORD_PROPNAME
Holds the name of the property to get the broker access password from. |
static boolean |
PERSISTENT_MODE_DEFAULT
Holds the message delivery mode to use for the test. |
static String |
PERSISTENT_MODE_PROPNAME
Holds the name of the property to get the test delivery mode from. |
static int |
PREFETCH_DEFAULT
Defines the default prefetch size to use when consuming messages. |
static String |
PREFETCH_PROPNAME
Holds the name of the property to set the prefetch size from. |
static boolean |
PUBLISHER_CONSUMER_ACTIVE_DEFAULT
Holds the default value of the publishers consumer active flag. |
static String |
PUBLISHER_CONSUMER_ACTIVE_PROPNAME
Holds the name of the property to get the publishers consumer active flag from. |
static boolean |
PUBLISHER_CONSUMER_BIND_DEFAULT
Holds the default value of the publisher consumer flag. |
static String |
PUBLISHER_CONSUMER_BIND_PROPNAME
Holds the name of the property to get the bind publisher procuder flag from. |
static boolean |
PUBLISHER_PRODUCER_BIND_DEFAULT
Holds the default value of the publisher producer flag. |
static String |
PUBLISHER_PRODUCER_BIND_PROPNAME
Holds the name of the property to get the bind publisher procuder flag from. |
static boolean |
PUBSUB_DEFAULT
Holds the pub/sub mode default, true means ping a topic, false means ping a queue. |
static String |
PUBSUB_PROPNAME
Holds the name of the property to get the p2p or pub/sub messaging mode from. |
static int |
RATE_DEFAULT
Defines the default rate (in pings per second) to send pings at. |
static String |
RATE_PROPNAME
Holds the name of the property to get the message rate from. |
static String |
RECEIVE_DESTINATION_NAME_ROOT_DEFAULT
Holds the root of the name of the default destination to send to. |
static String |
RECEIVE_DESTINATION_NAME_ROOT_PROPNAME
Holds the name of the property to get the destination name root from. |
static boolean |
RECEIVER_CONSUMER_ACTIVE_DEFAULT
Holds the default value of the receivers consumer active flag. |
static String |
RECEIVER_CONSUMER_ACTIVE_PROPNAME
Holds the name of the property to get the receivers consumer active flag from. |
static boolean |
RECEIVER_CONSUMER_BIND_DEFAULT
Holds the default value of the receivers consumer flag. |
static String |
RECEIVER_CONSUMER_BIND_PROPNAME
Holds the name of the property to get the bind receivers procuder flag from. |
static boolean |
RECEIVER_PRODUCER_BIND_DEFAULT
Holds the default value of the receivers producer flag. |
static String |
RECEIVER_PRODUCER_BIND_PROPNAME
Holds the name of the property to get the bind receivers procuder flag from. |
static boolean |
ROLLBACK_PUBLISHER_DEFAULT
Holds the default publisher roll back setting. |
static String |
ROLLBACK_PUBLISHER_PROPNAME
Holds the name of the property to get the publisher rollback flag from. |
static boolean |
ROLLBACK_RECEIVER_DEFAULT
Holds the default publisher roll back setting. |
static String |
ROLLBACK_RECEIVER_PROPNAME
Holds the name of the property to get the publisher rollback flag from. |
static String |
SELECTOR_DEFAULT
Holds the default message selector. |
static String |
SELECTOR_PROPNAME
Holds the name of the proeprty to get the. |
static String |
SEND_DESTINATION_NAME_ROOT_DEFAULT
Holds the root of the name of the default destination to send to. |
static String |
SEND_DESTINATION_NAME_ROOT_PROPNAME
Holds the name of the property to get the destination name root from. |
static long |
TIMEOUT_DEFAULT
Default time to wait before assuming that a ping has timed out. |
static String |
TIMEOUT_PROPNAME
Holds the name of the property to get the waiting timeout for response messages. |
static boolean |
TRANSACTED_PUBLISHER_DEFAULT
Holds the transactional mode to use for the test. |
static String |
TRANSACTED_PUBLISHER_PROPNAME
Holds the name of the property to get the test transactional mode from. |
static boolean |
TRANSACTED_RECEIVER_DEFAULT
Holds the transactional mode to use for the test. |
static String |
TRANSACTED_RECEIVER_PROPNAME
Holds the name of the property to get the test transactional mode from. |
static int |
TX_BATCH_SIZE_DEFAULT
Defines the default number of pings to send in each transaction when running transactionally. |
static String |
TX_BATCH_SIZE_PROPNAME
Holds the name of the property to get the commit batch size from. |
static String |
USERNAME_DEFAULT
Holds the default broker log on username. |
static String |
USERNAME_PROPNAME
Holds the name of the property to get the broker access username from. |
static boolean |
VERBOSE_DEFAULT
Holds the default verbose mode. |
static String |
VERBOSE_PROPNAME
Holds the name of the property to get the verbose mode proeprty from. |
static String |
VIRTUAL_HOST_DEFAULT
Holds the default virtual path for the test. |
static String |
VIRTUAL_HOST_PROPNAME
Holds the name of the property to get the test broker virtual path. |
Constructor Summary | |
---|---|
MessagingTestConfigProperties()
Creates a test configuration based on the defaults. |
|
MessagingTestConfigProperties(Properties properties)
Creates a test configuration based on the supplied properties. |
Method Summary | |
---|---|
int |
getAckMode()
The ack mode for message receivers to use. |
boolean |
getDurableDests()
Flag to indicate that tests should use durable destinations. |
boolean |
getDurableSubscription()
Flag to indicate that tests should use durable subscriptions. |
boolean |
getExclusive()
Flag to indicate that subscriptions should be exclusive. |
boolean |
getImmediate()
Flag to indicate that messages must be delivered immediately. |
boolean |
getMandatory()
Flag to indicate that messages must be routable. |
int |
getMaxPending()
The maximum amount of in-flight data, in bytes, that tests should send at any time. |
int |
getMessageSize()
The size of test messages to send. |
boolean |
getNoLocal()
Flag to indicate that subscriptions should be no-local. |
String |
getNotApplicableAssertionMode()
Gets the behavioural mode of not applicable assertions. |
String |
getPassword()
The password credentials to run tests with. |
boolean |
getPersistentMode()
Flag to indicate that persistent messages should be used. |
int |
getPrefetch()
The size of the prefetch queue to use. |
boolean |
getPublisherConsumerActive()
Flag to indicate that the publishing consumer should be created and actively listening. |
boolean |
getPublisherConsumerBind()
Flag to indicate that the publishing consumer should be set up to receive from a destination. |
boolean |
getPublisherProducerBind()
Flag to indicate that the publishing producer should be set up to publish to a destination. |
boolean |
getPublisherTransacted()
Flag to indicate that transactional messages should be sent by the publisher. |
boolean |
getPubsub()
Flag to indicate that test messages should be received publish/subscribe style by all receivers. |
String |
getRate()
Limiting rate for each sender in messages per second, or zero for unlimited. |
String |
getReceiveDestinationNameRoot()
A root to create all receiving destination names from. |
boolean |
getReceiverConsumerActive()
Flag to indicate that the receiving consumers should be created and actively listening. |
boolean |
getReceiverConsumerBind()
Flag to indicate that the receiving consumer should be set up to receive from a destination. |
boolean |
getReceiverProducerBind()
Flag to indicate that the receiving producer should be set up to publish to a destination. |
boolean |
getReceiverTransacted()
Flag to indicate that transactional receives should be used by the receiver. |
boolean |
getRollbackPublisher()
Gets the value of a flag to indicate that the publisher should rollback all messages sent. |
boolean |
getRollbackReceiver()
Gets the value of a flag to indicate that the receiver should rollback all messages received, then receive them again. |
String |
getSendDestinationNameRoot()
A root to create all test destination names from. |
long |
getTimeout()
The timeout duration to fail tests on, should they receive no messages within it. |
int |
getTxBatchSize()
The number of messages to batch into each transaction in transational tests. |
String |
getUsername()
The username credentials to run tests with. |
String |
getVirtualHost()
The name of the virtual host to run all tests over. |
Methods inherited from class org.apache.qpid.junit.extensions.util.ParsedProperties |
---|
getPropertyAsBoolean, getPropertyAsInteger, getPropertyAsLong, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setPropertyIfNull, setPropertyIfNull, setPropertyIfNull, setPropertyIfNull, setPropertyIfNull, setPropertyIfNull, setPropertyIfNull, setSysPropertyIfNull, setSysPropertyIfNull, setSysPropertyIfNull, setSysPropertyIfNull, setSysPropertyIfNull, setSysPropertyIfNull, setSysPropertyIfNull |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
Methods inherited from class java.util.Hashtable |
---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String CONNECTION_NAME
public static final String INITIAL_CONTEXT_FACTORY_PROPNAME
public static final String INITIAL_CONTEXT_FACTORY_DEFAULT
public static final String BROKER_PROPNAME
public static final String BROKER_DEFAULT
public static final String VIRTUAL_HOST_PROPNAME
public static final String VIRTUAL_HOST_DEFAULT
public static final String USERNAME_PROPNAME
public static final String USERNAME_DEFAULT
public static final String PASSWORD_PROPNAME
public static final String PASSWORD_DEFAULT
public static final String PUBLISHER_PRODUCER_BIND_PROPNAME
public static final boolean PUBLISHER_PRODUCER_BIND_DEFAULT
public static final String PUBLISHER_CONSUMER_BIND_PROPNAME
public static final boolean PUBLISHER_CONSUMER_BIND_DEFAULT
public static final String RECEIVER_PRODUCER_BIND_PROPNAME
public static final boolean RECEIVER_PRODUCER_BIND_DEFAULT
public static final String RECEIVER_CONSUMER_BIND_PROPNAME
public static final boolean RECEIVER_CONSUMER_BIND_DEFAULT
public static final String PUBLISHER_CONSUMER_ACTIVE_PROPNAME
public static final boolean PUBLISHER_CONSUMER_ACTIVE_DEFAULT
public static final String RECEIVER_CONSUMER_ACTIVE_PROPNAME
public static final boolean RECEIVER_CONSUMER_ACTIVE_DEFAULT
public static final String SEND_DESTINATION_NAME_ROOT_PROPNAME
public static final String SEND_DESTINATION_NAME_ROOT_DEFAULT
public static final String RECEIVE_DESTINATION_NAME_ROOT_PROPNAME
public static final String RECEIVE_DESTINATION_NAME_ROOT_DEFAULT
public static final String DESTINATION_COUNT_PROPNAME
public static final int DESTINATION_COUNT_DEFAULT
public static final String PUBSUB_PROPNAME
public static final boolean PUBSUB_DEFAULT
public static final String PERSISTENT_MODE_PROPNAME
public static final boolean PERSISTENT_MODE_DEFAULT
public static final String TRANSACTED_PUBLISHER_PROPNAME
public static final boolean TRANSACTED_PUBLISHER_DEFAULT
public static final String TRANSACTED_RECEIVER_PROPNAME
public static final boolean TRANSACTED_RECEIVER_DEFAULT
public static final String NO_LOCAL_PROPNAME
public static final boolean NO_LOCAL_DEFAULT
public static final String ACK_MODE_PROPNAME
public static final int ACK_MODE_DEFAULT
public static final String DURABLE_SUBSCRIPTION_PROPNAME
public static final boolean DURABLE_SUBSCRIPTION_DEFAULT
public static final String EXCLUSIVE_PROPNAME
public static final boolean EXCLUSIVE_DEFAULT
public static final String IMMEDIATE_PROPNAME
public static final boolean IMMEDIATE_DEFAULT
public static final String MANDATORY_PROPNAME
public static final boolean MANDATORY_DEFAULT
public static final String DURABLE_DESTS_PROPNAME
public static final boolean DURABLE_DESTS_DEFAULT
public static final String PREFETCH_PROPNAME
public static final int PREFETCH_DEFAULT
public static final String MESSAGE_SIZE_PROPNAME
public static final int MESSAGE_SIZE_DEAFULT
public static final String RATE_PROPNAME
public static final int RATE_DEFAULT
public static final String SELECTOR_PROPNAME
public static final String SELECTOR_DEFAULT
public static final String TIMEOUT_PROPNAME
public static final long TIMEOUT_DEFAULT
public static final String TX_BATCH_SIZE_PROPNAME
public static final int TX_BATCH_SIZE_DEFAULT
public static final String MAX_PENDING_PROPNAME
public static final int MAX_PENDING_DEFAULT
public static final String ROLLBACK_PUBLISHER_PROPNAME
public static final boolean ROLLBACK_PUBLISHER_DEFAULT
public static final String ROLLBACK_RECEIVER_PROPNAME
public static final boolean ROLLBACK_RECEIVER_DEFAULT
public static final String NOT_APPLICABLE_ASSERTION_PROPNAME
public static final String NOT_APPLICABLE_ASSERTION_DEFAULT
public static final String VERBOSE_PROPNAME
public static final boolean VERBOSE_DEFAULT
public static org.apache.qpid.junit.extensions.util.ParsedProperties defaults
Constructor Detail |
---|
public MessagingTestConfigProperties()
public MessagingTestConfigProperties(Properties properties)
properties
- The test configuration.Method Detail |
---|
public int getMessageSize()
public boolean getPublisherProducerBind()
public boolean getPublisherConsumerBind()
public boolean getReceiverProducerBind()
public boolean getReceiverConsumerBind()
public boolean getPublisherConsumerActive()
public boolean getReceiverConsumerActive()
public String getSendDestinationNameRoot()
public String getReceiveDestinationNameRoot()
public boolean getPersistentMode()
public boolean getPublisherTransacted()
public boolean getReceiverTransacted()
public String getVirtualHost()
public String getRate()
public boolean getPubsub()
public String getUsername()
public String getPassword()
public long getTimeout()
public int getTxBatchSize()
public boolean getDurableDests()
public int getAckMode()
public boolean getDurableSubscription()
public int getMaxPending()
public int getPrefetch()
public boolean getNoLocal()
public boolean getExclusive()
public boolean getImmediate()
public boolean getMandatory()
public boolean getRollbackPublisher()
public boolean getRollbackReceiver()
public String getNotApplicableAssertionMode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |