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

Quick Search    Search Deep

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

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.activemq.transport.TransportChannelTestSupport
All Implemented Interfaces:
org.activemq.message.PacketListener, junit.framework.Test, TransportChannelListener

public class TransportChannelTestSupport
extends junit.framework.TestCase
implements org.activemq.message.PacketListener, TransportChannelListener

Version:
$Revision: 1.1.1.1 $

Field Summary
private  boolean closeReceiver
           
protected  java.util.List exceptions
           
private  org.activemq.util.IdGenerator idGenerator
           
protected  java.lang.Object mutex
           
protected  java.util.ArrayList packets
           
protected  TransportChannel receiver
           
protected  TransportChannel sender
           
protected  boolean sendReceipts
           
protected  TransportServerChannel server
           
protected  int TEST_SIZE
           
protected  org.activemq.io.WireFormat wireFormat
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TransportChannelTestSupport()
           
TransportChannelTestSupport(java.lang.String name)
           
 
Method Summary
 void addClient(TransportChannel channel)
          Called when a new channel is added to a server
protected  void configureReceiver()
           
protected  void configureServer()
           
 void consume(org.activemq.message.Packet packet)
          Consume a Packet
protected  void createSenderAndReceiver(java.lang.String string)
           
protected  void createSenderAndServer(java.lang.String subject)
           
protected  void logMessage(java.lang.String message, javax.jms.JMSException ex)
           
 void removeClient(TransportChannel channel)
          Called when a channel has been closed and removed from a server
protected  void setUp()
          Assume that sender and receiver are created before we're invoked
protected  void tearDown()
          Tears down the fixture, for example, close a network connection.
 void testAsyncSendWithReceipt()
           
 void testForceDisconnect()
           
 void testRpc()
           
 void testSendPacket()
           
 
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

TEST_SIZE

protected int TEST_SIZE

mutex

protected java.lang.Object mutex

sender

protected TransportChannel sender

receiver

protected TransportChannel receiver

server

protected TransportServerChannel server

packets

protected java.util.ArrayList packets

exceptions

protected java.util.List exceptions

sendReceipts

protected boolean sendReceipts

idGenerator

private org.activemq.util.IdGenerator idGenerator

wireFormat

protected org.activemq.io.WireFormat wireFormat

closeReceiver

private boolean closeReceiver
Constructor Detail

TransportChannelTestSupport

public TransportChannelTestSupport()

TransportChannelTestSupport

public TransportChannelTestSupport(java.lang.String name)
Method Detail

testSendPacket

public void testSendPacket()
                    throws java.lang.Exception

testAsyncSendWithReceipt

public void testAsyncSendWithReceipt()
                              throws java.lang.Exception

testRpc

public void testRpc()
             throws java.lang.Exception

testForceDisconnect

public void testForceDisconnect()
                         throws java.lang.Exception

consume

public void consume(org.activemq.message.Packet packet)
Description copied from interface: org.activemq.message.PacketListener
Consume a Packet

Specified by:
consume in interface org.activemq.message.PacketListener

setUp

protected void setUp()
              throws java.lang.Exception
Assume that sender and receiver are created before we're invoked


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.


configureServer

protected void configureServer()
                        throws javax.jms.JMSException

configureReceiver

protected void configureReceiver()

createSenderAndReceiver

protected void createSenderAndReceiver(java.lang.String string)
                                throws java.net.URISyntaxException,
                                       javax.jms.JMSException

createSenderAndServer

protected void createSenderAndServer(java.lang.String subject)
                              throws java.net.URISyntaxException,
                                     javax.jms.JMSException

logMessage

protected void logMessage(java.lang.String message,
                          javax.jms.JMSException ex)

addClient

public void addClient(TransportChannel channel)
Description copied from interface: TransportChannelListener
Called when a new channel is added to a server

Specified by:
addClient in interface TransportChannelListener

removeClient

public void removeClient(TransportChannel channel)
Description copied from interface: TransportChannelListener
Called when a channel has been closed and removed from a server

Specified by:
removeClient in interface TransportChannelListener