org.apache.qpid.test.framework
Interface CircuitEnd

All Known Implementing Classes:
CircuitEndBase, LocalAMQPPublisherImpl, LocalPublisherImpl, LocalReceiverImpl, TestClientCircuitEnd

public interface CircuitEnd

A CircuitEnd is a pair consisting of one message producer and one message consumer, that represents one end of a test circuit. It is a standard unit of connectivity allowing a full-duplex conversation to be held, provided both the consumer and producer are instantiated and configured.

CRC Card
Responsibilities
Provide a message producer for sending messages.
Provide a message consumer for receiving messages.

Todo:
Update the ConversationFactory so that it accepts these as the basic conversation connection units.

Method Summary
 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.
 MessageProducer getProducer()
          Gets the message producer at this circuit end point.
 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.
 

Method Detail

getProducer

MessageProducer getProducer()
Gets the message producer at this circuit end point.

Returns:
The message producer at with this circuit end point.

getConsumer

MessageConsumer getConsumer()
Gets the message consumer at this circuit end point.

Returns:
The message consumer at this circuit end point.

send

void send(Message message)
          throws JMSException
Send the specified message over the producer at this end point.

Parameters:
message - The message to send.
Throws:
JMSException - Any JMS exception occuring during the send is allowed to fall through.

getSession

Session getSession()
Gets the JMS Session associated with this circuit end point.

Returns:
The JMS Session associated with this circuit end point.

close

void close()
           throws JMSException
Closes the message producers and consumers and the sessions, associated with this circuit end point.

Throws:
JMSException - Any JMSExceptions occurring during the close are allowed to fall through.

getMessageMonitor

MessageMonitor getMessageMonitor()
Returns the message monitor for reporting on received messages on this circuit end.

Returns:
The message monitor for this circuit end.

getExceptionMonitor

ExceptionMonitor getExceptionMonitor()
Returns the exception monitor for reporting on exceptions received on this circuit end.

Returns:
The exception monitor for this circuit end.


Licensed to the Apache Software Foundation