org.apache.qpid.test.framework
Class MessageIdentityVector

java.lang.Object
  extended by org.apache.qpid.test.framework.MessageIdentityVector

public class MessageIdentityVector
extends Object

MessageIdentityVector provides a message identification scheme, that matches individual messages with test cases. Test messages are being sent by a number of test clients, sending messages over a set of routes, and being received by another set of test clients. Each test is itself, being run within a test cycle, of which there could be many. It is the job of the test coordinator to request and receive reports from the available test clients, on what has been sent, what has been received, and what errors may have occurred, and to reconcile this information against the assertions being applied by the test case. In order to be able to figure out which messages belong to which test, there needs to be an identification scheme, that the coordinator can use to correlate messages in senders and receiver reports. Every message sent in a test can be associated with this information.

CRC Card
Responsibilities Collaborations
Identify a test case, a handling client id, a circuit end within the client, and a test cycle number.


Constructor Summary
MessageIdentityVector(String testCase, String clientId, int circuitEndId, int testCycleNumber)
          Creates a new identity vector for test messages.
 
Method Summary
 boolean equals(Object o)
          Compares this identity vector with another for equality.
 int getCircuitEndId()
          Reports the circuit end number within the test client.
 String getClientId()
          Resports the client id.
 String getTestCase()
          Reports the name of the test case.
 TestCaseVector getTestCaseVector()
          Reports the test case vector component of the message identity vector.
 int getTestCycleNumber()
          Reports the test iteration cycle number within the test case.
 int hashCode()
          Computes a hash code for this identity vector based on all fields.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageIdentityVector

public MessageIdentityVector(String testCase,
                             String clientId,
                             int circuitEndId,
                             int testCycleNumber)
Creates a new identity vector for test messages.

Parameters:
testCase - The name of the test case generating the messages.
clientId - The unique id of the client implementing a circuit end that is handling the messages.
circuitEndId - The unique id number of the circuit end within the client.
testCycleNumber - The cycle iteration number of the test case.
Method Detail

getTestCaseVector

public TestCaseVector getTestCaseVector()
Reports the test case vector component of the message identity vector.

Returns:
The test case vector component of the message identity vector.

getTestCase

public String getTestCase()
Reports the name of the test case.

Returns:
The name of the test case.

getTestCycleNumber

public int getTestCycleNumber()
Reports the test iteration cycle number within the test case.

Returns:
The test iteration cycle number within the test case.

getClientId

public String getClientId()
Resports the client id.

Returns:
The client id.

getCircuitEndId

public int getCircuitEndId()
Reports the circuit end number within the test client.

Returns:
The circuit end number within the test client.

equals

public boolean equals(Object o)
Compares this identity vector with another for equality. All fields must match.

Overrides:
equals in class Object
Parameters:
o - The identity vector to compare with.
Returns:
true if the identity vector is identical to this one by all fields, false otherwise.

hashCode

public int hashCode()
Computes a hash code for this identity vector based on all fields.

Overrides:
hashCode in class Object
Returns:
A hash code for this identity vector based on all fields.


Licensed to the Apache Software Foundation