|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.interop.clienttestcases.TestCase2BasicP2P
public class TestCase2BasicP2P
Implements test case 2, basic P2P. Sends/received a specified number of messages to a specified route on the default direct exchange. 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. | |
Generate test reports. |
Nested Class Summary |
---|
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) MessageProducer |
producer
The producer to send the test messages with. |
Constructor Summary | |
---|---|
TestCase2BasicP2P()
|
Method Summary | |
---|---|
boolean |
acceptInvite(Message inviteMessage)
Determines whether the test invite that matched this test case is acceptable. |
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 |
onMessage(Message message)
Counts incoming test messages. |
void |
start(int numMessages)
Performs the test case actions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
MessageProducer producer
Constructor Detail |
---|
public TestCase2BasicP2P()
Method Detail |
---|
public String getName()
getName
in interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
public boolean acceptInvite(Message inviteMessage) throws JMSException
acceptInvite
in interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
inviteMessage
- The invitation to accept or reject.
JMSException
- Any JMSException resulting from reading the message are allowed to fall through.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
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
numMessages
- The number of test messages to send.
JMSException
- Any JMSException resulting from reading the message are allowed to fall through.public Message getReport(Session session) throws JMSException
getReport
in interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
session
- The controlSession to create the report message in.
JMSException
- Any JMSExceptions resulting from creating the report are allowed to fall through.public void onMessage(Message message)
onMessage
in interface MessageListener
message
- The incoming test message.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |