org.apache.qpid.test.framework.sequencers
Class BaseCircuitFactory

java.lang.Object
  extended by org.apache.qpid.test.framework.sequencers.BaseCircuitFactory
All Implemented Interfaces:
CircuitFactory
Direct Known Subclasses:
FanOutCircuitFactory, InteropCircuitFactory

public abstract class BaseCircuitFactory
extends Object
implements CircuitFactory

BaseCircuitFactory provides some functionality common to all CircuitFactorys, such as the details of all TestClients that make up the end-points of the circuits that the factory creates, and an active ConversationFactory that can be used to generate control conversations with those circuit end-points.

CRC Card
Responsibilities Collaborations
Hold the details of the sending and receiving end-points to create circuits from.
Provide a conversation factory to create control conversations with the end-points.


Field Summary
protected  ConversationFactory conversationFactory
          Holds the conversation factory over which to coordinate the test.
protected  List<TestClientDetails> receivers
          Holds the contact details for the receving test client.
protected  TestClientDetails sender
          Holds the contact details for the sending test client.
 
Constructor Summary
BaseCircuitFactory()
           
 
Method Summary
 Circuit createCircuit(Properties testProperties)
          Creates a test circuit for the test, configered by the test parameters specified.
 ConversationFactory getConversationFactory()
          Provides the conversation factory for providing the distributed test sequencing conversations over the test connection.
 List<TestClientDetails> getReceivers()
          Supplies the receiving test client.
 TestClientDetails getSender()
          Supplies the sending test client.
 void setConversationFactory(ConversationFactory conversationFactory)
          Accepts the conversation factory over which to hold the test coordinating conversation.
 void setReceiver(TestClientDetails receiver)
          Sets the receiving test client to coordinate the test with.
 void setSender(TestClientDetails sender)
          Sets the sender test client to coordinate the test with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.qpid.test.framework.sequencers.CircuitFactory
createCircuit, sequenceTest
 

Field Detail

sender

protected TestClientDetails sender
Holds the contact details for the sending test client.


receivers

protected List<TestClientDetails> receivers
Holds the contact details for the receving test client.


conversationFactory

protected ConversationFactory conversationFactory
Holds the conversation factory over which to coordinate the test.

Constructor Detail

BaseCircuitFactory

public BaseCircuitFactory()
Method Detail

createCircuit

public Circuit createCircuit(Properties testProperties)
Creates a test circuit for the test, configered by the test parameters specified.

Parameters:
testProperties - The test parameters.
Returns:
A test circuit.

setSender

public void setSender(TestClientDetails sender)
Sets the sender test client to coordinate the test with.

Specified by:
setSender in interface CircuitFactory
Parameters:
sender - The contact details of the sending client in the test.

setReceiver

public void setReceiver(TestClientDetails receiver)
Sets the receiving test client to coordinate the test with.

Specified by:
setReceiver in interface CircuitFactory
Parameters:
receiver - The contact details of the sending client in the test.

getSender

public TestClientDetails getSender()
Supplies the sending test client.

Specified by:
getSender in interface CircuitFactory
Returns:
The sending test client.

getReceivers

public List<TestClientDetails> getReceivers()
Supplies the receiving test client.

Specified by:
getReceivers in interface CircuitFactory
Returns:
The receiving test client.

setConversationFactory

public void setConversationFactory(ConversationFactory conversationFactory)
Accepts the conversation factory over which to hold the test coordinating conversation.

Specified by:
setConversationFactory in interface CircuitFactory
Parameters:
conversationFactory - The conversation factory to coordinate the test over.

getConversationFactory

public ConversationFactory getConversationFactory()
Provides the conversation factory for providing the distributed test sequencing conversations over the test connection.

Returns:
The conversation factory to create test sequencing conversations with.


Licensed to the Apache Software Foundation