|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.test.framework.distributedcircuit.TestClientCircuitEnd
public class TestClientCircuitEnd
A TestClientCircuitEnd is a CircuitEnd
that may be controlled from a
TestClient
, and that forms a single publishing or
receiving end point in a distributed test Circuit
.
Circuit
). That is, it will
send the number of test messages required, using the test configuration parameters given in the test invite, and
return a report on its activities to the circuit controller.
When operation in the RECEIVER role, this circuit end acts as part of the default circuit test procedure. It will
receive test messages, on the setup specified in the test configuration parameters, and keep count of the messages
received, and time taken to receive them. When requested by the circuit controller to provide a report, it will
return this report of its activities.
Responsibilities | Collaborations |
---|---|
Provide a message producer for sending messages. | CircuitEnd , LocalCircuitFactory , TestUtils
|
Provide a message consumer for receiving messages. | CircuitEnd , LocalCircuitFactory , TestUtils
|
Supply the name of the test case that this implements. | |
Accept/Reject invites based on test parameters. | MessagingTestConfigProperties
|
Adapt to assigned roles. | TestClientControlledTest.Roles
|
Perform test case actions. | MessageMonitor
|
Generate test reports. | MessageMonitor
|
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest |
---|
TestClientControlledTest.Roles |
Field Summary | |
---|---|
(package private) CircuitEnd |
circuitEnd
Holds the circuit end for this test. |
(package private) MessageMonitor |
messageMonitor
Holds a message monitor for this circuit end, either the monitor on the consumer when in RECEIVER more, or a monitor updated on every message sent, when acting as a SENDER. |
(package private) org.apache.qpid.junit.extensions.util.ParsedProperties |
testProps
Holds the test parameters. |
Constructor Summary | |
---|---|
TestClientCircuitEnd()
|
Method Summary | |
---|---|
boolean |
acceptInvite(Message inviteMessage)
Determines whether the test invite that matched this test case is acceptable. |
void |
assignRole(TestClientControlledTest.Roles role,
Message assignRoleMessage)
Assigns the role to be played by this test case. |
void |
close()
Closes the message producers and consumers and the sessions, associated with this circuit end point. |
MessageConsumer |
getConsumer()
Gets the message consumer at this circuit end point. |
ExceptionMonitor |
getExceptionMonitor()
Returns the exception monitor for reporting on exceptions received on this circuit end. |
MessageMonitor |
getMessageMonitor()
Returns the message monitor for reporting on received messages on this circuit end. |
String |
getName()
Should provide the name of the test case that this class implements. |
MessageProducer |
getProducer()
Gets the message producer at this circuit end point. |
Message |
getReport(Session session)
Gets a report on the actions performed by the test case in its assigned role. |
Session |
getSession()
Gets the JMS Session associated with this circuit end point. |
void |
send(Message message)
Send the specified message over the producer at this end point. |
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 |
---|
org.apache.qpid.junit.extensions.util.ParsedProperties testProps
CircuitEnd circuitEnd
MessageMonitor messageMonitor
Constructor Detail |
---|
public TestClientCircuitEnd()
Method Detail |
---|
public String getName()
getName
in interface TestClientControlledTest
public boolean acceptInvite(Message inviteMessage) throws JMSException
acceptInvite
in interface TestClientControlledTest
inviteMessage
- The invitation to accept or reject.
JMSException
- Any JMSException resulting from reading the message are allowed to fall through.public void assignRole(TestClientControlledTest.Roles role, Message assignRoleMessage) throws JMSException
assignRole
in interface 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 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 TestClientControlledTest
session
- The controlSession to create the report message in.
JMSException
- Any JMSExceptions resulting from creating the report are allowed to fall through.public MessageProducer getProducer()
getProducer
in interface CircuitEnd
public MessageConsumer getConsumer()
getConsumer
in interface CircuitEnd
public void send(Message message) throws JMSException
send
in interface CircuitEnd
message
- The message to send.
JMSException
- Any JMS exception occuring during the send is allowed to fall through.public Session getSession()
getSession
in interface CircuitEnd
public void close() throws JMSException
close
in interface CircuitEnd
JMSException
- Any JMSExceptions occurring during the close are allowed to fall through.public MessageMonitor getMessageMonitor()
getMessageMonitor
in interface CircuitEnd
public ExceptionMonitor getExceptionMonitor()
getExceptionMonitor
in interface CircuitEnd
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |