|
||||||||||
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.LocalPublisherImpl
public class LocalPublisherImpl
Provides an implementation of the Publisher
interface and wraps a single message producer and consumer on
a single controlSession, as a CircuitEnd
. A local publisher 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 publisher received no exceptions. | |
Provide assertion that the publisher received a no consumers error code. | |
Provide assertion that the publisher received a no route error code. |
Field Summary | |
---|---|
protected LocalCircuitImpl |
circuit
Holds a reference to the containing circuit. |
Constructor Summary | |
---|---|
LocalPublisherImpl(CircuitEndBase end)
Creates a circuit end point from the producer, consumer and controlSession in a circuit end base implementation. |
|
LocalPublisherImpl(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 |
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 publisher got a given exception during the test. |
Assertion |
noExceptionsAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
Provides an assertion that the publisher encountered no exceptions. |
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 |
Field Detail |
---|
protected LocalCircuitImpl circuit
Constructor Detail |
---|
public LocalPublisherImpl(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 LocalPublisherImpl(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 Publisher
testProps
-
public Assertion channelClosedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
channelClosedAssertion
in interface Publisher
testProps
- The test configuration properties.
public Assertion exceptionAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps, Class<? extends Exception> exceptionClass)
exceptionAssertion
in interface Publisher
testProps
- The test configuration properties.exceptionClass
- The exception class to check for.
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 |