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

Quick Search    Search Deep

org.activemq.transport
Class TopicClusterTest  view TopicClusterTest download TopicClusterTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.activemq.transport.TopicClusterTest
All Implemented Interfaces:
javax.jms.MessageListener, junit.framework.Test
Direct Known Subclasses:
QueueClusterTest

public class TopicClusterTest
extends junit.framework.TestCase
implements javax.jms.MessageListener

Version:
$Revision: 1.1.1.1 $

Field Summary
protected  javax.jms.Connection[] connections
           
protected  int deliveryMode
           
protected  javax.jms.Destination destination
           
protected  org.apache.commons.logging.Log log
           
protected static int MESSAGE_COUNT
           
protected static int NUMBER_IN_CLUSTER
           
protected  javax.jms.MessageProducer[] producers
           
protected  EDU.oswego.cs.dl.util.concurrent.SynchronizedInt receivedMessageCount
           
protected  boolean topic
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TopicClusterTest()
           
 
Method Summary
protected  javax.jms.Connection createConnection(java.lang.String name)
           
protected  javax.jms.Destination createDestination()
           
protected  javax.jms.Destination createDestination(java.lang.String name)
           
protected  org.activemq.ActiveMQConnectionFactory createGenericClusterFactory(java.lang.String brokerName)
           
protected  javax.jms.MessageConsumer createMessageConsumer(javax.jms.Session session, javax.jms.Destination destination)
           
protected  int expectedReceiveCount()
           
 void onMessage(javax.jms.Message msg)
           
protected  void setUp()
          Sets up the fixture, for example, open a network connection.
protected  void tearDown()
          Tears down the fixture, for example, close a network connection.
 void testSendReceive()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

log

protected org.apache.commons.logging.Log log

destination

protected javax.jms.Destination destination

topic

protected boolean topic

receivedMessageCount

protected EDU.oswego.cs.dl.util.concurrent.SynchronizedInt receivedMessageCount

MESSAGE_COUNT

protected static int MESSAGE_COUNT

NUMBER_IN_CLUSTER

protected static int NUMBER_IN_CLUSTER

deliveryMode

protected int deliveryMode

producers

protected javax.jms.MessageProducer[] producers

connections

protected javax.jms.Connection[] connections
Constructor Detail

TopicClusterTest

public TopicClusterTest()
Method Detail

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.


tearDown

protected void tearDown()
                 throws java.lang.Exception
Description copied from class: junit.framework.TestCase
Tears down the fixture, for example, close a network connection. This method is called after a test is executed.


createMessageConsumer

protected javax.jms.MessageConsumer createMessageConsumer(javax.jms.Session session,
                                                          javax.jms.Destination destination)
                                                   throws javax.jms.JMSException

createGenericClusterFactory

protected org.activemq.ActiveMQConnectionFactory createGenericClusterFactory(java.lang.String brokerName)
                                                                      throws javax.jms.JMSException

expectedReceiveCount

protected int expectedReceiveCount()

createConnection

protected javax.jms.Connection createConnection(java.lang.String name)
                                         throws javax.jms.JMSException

createDestination

protected javax.jms.Destination createDestination()

createDestination

protected javax.jms.Destination createDestination(java.lang.String name)

onMessage

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

testSendReceive

public void testSendReceive()
                     throws java.lang.Exception