|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.interop.clienttestcases.TestCase3BasicPubSub
org.apache.qpid.sustained.SustainedClientTestCase
public class SustainedClientTestCase
Implements test case 3, basic pub/sub. Sends/received a specified number of messages to a specified route on the default topic exchange, using the specified number of receivers connections. Produces reports on the actual number of messages sent/received.
Responsibilities | Collaborations |
---|---|
Supply the name of the test case that this implements. | |
Accept/Reject invites based on test parameters. | |
Adapt to assigned roles. | |
Send required number of test messages using pub/sub. | |
Generate test reports. |
Nested Class Summary | |
---|---|
(package private) class |
SustainedClientTestCase.SustainedListener
Inner class that listens for messages and sends a report for the time taken between receiving the 'start' and 'end' messages. |
(package private) class |
SustainedClientTestCase.SustainedRateAdapter
This class is used here to adjust the _delay value which in turn is used to control the number of messages/second that are sent through the test system. |
Nested classes/interfaces inherited from interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest |
---|
org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest.Roles |
Field Summary | |
---|---|
(package private) int |
_batchSize
|
(package private) SustainedClientTestCase.SustainedRateAdapter |
_rateAdapter
Adapter that adjusts the send rate based on the updates from clients. |
(package private) MessageProducer |
producer
The producer to send the test messages with. |
Constructor Summary | |
---|---|
SustainedClientTestCase()
|
Method Summary | |
---|---|
void |
assignRole(org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest.Roles role,
Message assignRoleMessage)
Assigns the role to be played by this test case. |
String |
getName()
Should provide the name of the test case that this class implements. |
Message |
getReport(Session session)
Gets a report on the actions performed by the test case in its assigned role. |
void |
onException(JMSException jmsException)
|
void |
start(int numMessages)
Performs the test case actions. |
void |
terminate()
|
Methods inherited from class org.apache.qpid.interop.clienttestcases.TestCase3BasicPubSub |
---|
acceptInvite, onMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.jms.MessageListener |
---|
onMessage |
Field Detail |
---|
MessageProducer producer
SustainedClientTestCase.SustainedRateAdapter _rateAdapter
int _batchSize
Constructor Detail |
---|
public SustainedClientTestCase()
Method Detail |
---|
public String getName()
getName
in interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
getName
in class TestCase3BasicPubSub
public void assignRole(org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest.Roles role, Message assignRoleMessage) throws JMSException
assignRole
in interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
assignRole
in class TestCase3BasicPubSub
role
- The role to be played; sender or receivers.assignRoleMessage
- The role assingment message, contains the full test parameters.
JMSException
- Any JMSException resulting from reading the message are allowed to fall through.public void start(int numMessages) throws JMSException
start
in interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
start
in class TestCase3BasicPubSub
numMessages
-
JMSException
- Any JMSException resulting from reading the message are allowed to fall through.public void terminate() throws JMSException, InterruptedException
JMSException
InterruptedException
public Message getReport(Session session) throws JMSException
getReport
in interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
getReport
in class TestCase3BasicPubSub
session
- The controlSession to create the report message in.
JMSException
- Any JMSExceptions resulting from creating the report are allowed to fall through.public void onException(JMSException jmsException)
onException
in interface ExceptionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |