|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.test.framework.CircuitEndBase
org.apache.qpid.test.framework.localcircuit.LocalReceiverImpl
public class LocalReceiverImpl
Provides an implementation of the Receiver
interface that wraps a single message producer and consumer on
a single controlSession, as a CircuitEnd
. A local receiver also acts as a circuit end, because for a locally
located circuit the assertions may be applied directly, there does not need to be any inter process messaging
between the publisher and its single circuit end, in order to ascertain its status.
Responsibilities | Collaborations |
---|---|
Provide a message producer for sending messages. | |
Provide a message consumer for receiving messages. | |
Provide assertion that the receivers received no exceptions. | |
Provide assertion that the receivers received all test messages sent to it. |
Constructor Summary | |
---|---|
LocalReceiverImpl(CircuitEndBase end)
Creates a circuit end point from the producer, consumer and controlSession in a circuit end base implementation. |
|
LocalReceiverImpl(MessageProducer producer,
MessageConsumer consumer,
Session session,
MessageMonitor messageMonitor,
ExceptionMonitor exceptionMonitor)
Creates a circuit end point on the specified producer, consumer and controlSession. |
Method Summary | |
---|---|
Assertion |
allMessagesReceivedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
Provides an assertion that the receivers got all messages that were sent to it. |
Assertion |
channelClosedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
Provides an assertion that the AMQP channel was forcibly closed by an error condition. |
Assertion |
exceptionAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps,
Class<? extends Exception> exceptionClass)
Provides an assertion that the receiver got a given exception during the test. |
Assertion |
noExceptionsAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
Provides an assertion that the receivers encountered no exceptions. |
Assertion |
noMessagesReceivedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
Provides an assertion that the receivers got none of the messages that were sent to it. |
void |
setCircuit(LocalCircuitImpl circuit)
Sets the contianing circuit. |
Methods inherited from class org.apache.qpid.test.framework.CircuitEndBase |
---|
close, getConsumer, getExceptionMonitor, getMessageMonitor, getProducer, getSession, send |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalReceiverImpl(MessageProducer producer, MessageConsumer consumer, Session session, MessageMonitor messageMonitor, ExceptionMonitor exceptionMonitor)
producer
- The message producer for the circuit end point.consumer
- The message consumer for the circuit end point.session
- The controlSession for the circuit end point.messageMonitor
- The monitor to notify of all messages received by the circuit end.exceptionMonitor
- The monitor to notify of all exceptions received by the circuit end.public LocalReceiverImpl(CircuitEndBase end)
end
- The circuit end base implementation to take producers and consumers from.Method Detail |
---|
public Assertion noExceptionsAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
noExceptionsAssertion
in interface Receiver
testProps
- The test configuration properties.
public Assertion channelClosedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
channelClosedAssertion
in interface Receiver
testProps
- The test configuration properties.
public Assertion allMessagesReceivedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
allMessagesReceivedAssertion
in interface Receiver
testProps
- The test configuration properties.
public Assertion noMessagesReceivedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
noMessagesReceivedAssertion
in interface Receiver
testProps
- The test configuration properties.
public Assertion exceptionAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps, Class<? extends Exception> exceptionClass)
exceptionAssertion
in interface Receiver
testProps
- The test configuration properties.exceptionClass
- The exception class to check for. @return An assertion that the receiver got a given exception during the test.
public void setCircuit(LocalCircuitImpl circuit)
circuit
- The containing circuit.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |