Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq
Class JmsSendReceiveTestSupport  view JmsSendReceiveTestSupport download JmsSendReceiveTestSupport.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.activemq.TestSupport
              extended byorg.activemq.JmsSendReceiveTestSupport
All Implemented Interfaces:
javax.jms.MessageListener, junit.framework.Test
Direct Known Subclasses:
JmsTopicSendReceiveTest, JmsTopicSendReceiveWithTwoConnectionsTest

public class JmsSendReceiveTestSupport
extends TestSupport
implements javax.jms.MessageListener

Version:
$Revision: 1.1.1.1 $

Field Summary
protected  javax.jms.MessageConsumer consumer
           
protected  javax.jms.Destination consumerDestination
           
protected  java.lang.String[] data
           
protected  int deliveryMode
           
protected  boolean durable
           
protected  java.lang.Object lock
           
protected  int messageCount
           
protected  java.util.List messages
           
protected  javax.jms.MessageProducer producer
           
protected  javax.jms.Destination producerDestination
           
protected  javax.jms.Session session
           
protected  boolean topic
           
protected  boolean verbose
           
 
Fields inherited from class org.activemq.TestSupport
connectionFactory, log
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
JmsSendReceiveTestSupport()
           
 
Method Summary
protected  void assertMessagesAreReceived()
           
protected  void assertMessagesReceivedAreValid(java.util.List receivedMessages)
           
protected  void consumeMessage(javax.jms.Message message, java.util.List messageList)
           
protected  java.util.List createConcurrentList()
           
 void onMessage(javax.jms.Message message)
           
protected  void setUp()
          Sets up the fixture, for example, open a network connection.
 void testSendReceive()
           
protected  void waitForMessagesToBeDelivered()
           
 
Methods inherited from class org.activemq.TestSupport
assertTextMessagesEqual, createConnection, createConnectionFactory, createDestination, createMessage, getConnectionFactory, getConsumerSubject, getProducerSubject, getSubject, recursiveDelete, removeMessageStore
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

messageCount

protected int messageCount

data

protected java.lang.String[] data

session

protected javax.jms.Session session

consumer

protected javax.jms.MessageConsumer consumer

producer

protected javax.jms.MessageProducer producer

consumerDestination

protected javax.jms.Destination consumerDestination

producerDestination

protected javax.jms.Destination producerDestination

messages

protected java.util.List messages

topic

protected boolean topic

durable

protected boolean durable

deliveryMode

protected int deliveryMode

lock

protected final java.lang.Object lock

verbose

protected boolean verbose
Constructor Detail

JmsSendReceiveTestSupport

public JmsSendReceiveTestSupport()
Method Detail

testSendReceive

public void testSendReceive()
                     throws java.lang.Exception

assertMessagesAreReceived

protected void assertMessagesAreReceived()
                                  throws javax.jms.JMSException

assertMessagesReceivedAreValid

protected void assertMessagesReceivedAreValid(java.util.List receivedMessages)
                                       throws javax.jms.JMSException

waitForMessagesToBeDelivered

protected void waitForMessagesToBeDelivered()

setUp

protected void setUp()
              throws java.lang.Exception
Description copied from class: junit.framework.TestCase
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.


onMessage

public void onMessage(javax.jms.Message message)
Specified by:
onMessage in interface javax.jms.MessageListener

consumeMessage

protected void consumeMessage(javax.jms.Message message,
                              java.util.List messageList)

createConcurrentList

protected java.util.List createConcurrentList()