Apache JMeter

org.apache.jmeter.protocol.jms.client
Class ConnectionFactory

java.lang.Object
  extended byorg.apache.jmeter.protocol.jms.client.ConnectionFactory
All Implemented Interfaces:
TestListener

public class ConnectionFactory
extends Object
implements TestListener

ConnectionFactory is responsible for creating new connections. Eventually, the connection factory should read an external configuration file and create a pool of connections. The current implementation just does the basics. Once the tires get kicked a bit, we can add connection pooling support.


Constructor Summary
protected ConnectionFactory()
           
 
Method Summary
static javax.jms.QueueConnection getQueueConnection(Context ctx, String queueConn)
           
static javax.jms.QueueConnectionFactory getQueueConnectionFactory(Context ctx, String fac)
           
static javax.jms.TopicConnection getTopicConnection()
           
static javax.jms.TopicConnectionFactory getTopicConnectionFactory(Context ctx, String fac)
           
 void testEnded()
          endTest cleans up the client
 void testEnded(String test)
           Called once for all threads after the end of a test.
 void testIterationStart(LoopIterationEvent event)
          Each time through a Thread Group's test script, an iteration event is fired for each thread.
 void testStarted()
          startTest sets up the client and gets it ready for the test.
 void testStarted(String test)
           Called just before the start of the test from the main engine thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionFactory

protected ConnectionFactory()
Method Detail

testStarted

public void testStarted(String test)
Description copied from interface: TestListener

Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.

N.B. testStarted() and testEnded() are called from different threads.

Specified by:
testStarted in interface TestListener
See Also:
StandardJMeterEngine.run()

testEnded

public void testEnded(String test)
Description copied from interface: TestListener

Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.

N.B. testStarted() and testEnded() are called from different threads.

Specified by:
testEnded in interface TestListener
See Also:
StandardJMeterEngine.stopTest()

testEnded

public void testEnded()
endTest cleans up the client

Specified by:
testEnded in interface TestListener
See Also:
TestListener.endTest(junit.framework.Test)

testStarted

public void testStarted()
startTest sets up the client and gets it ready for the test. Since async messaging is different than request/ response applications, the connection is created at the beginning of the test and closed at the end of the test.

Specified by:
testStarted in interface TestListener
See Also:
StandardJMeterEngine.run()

testIterationStart

public void testIterationStart(LoopIterationEvent event)
Description copied from interface: TestListener
Each time through a Thread Group's test script, an iteration event is fired for each thread. This will be after the test elements have been cloned, so in general the instance will not be the same as the ones the start/end methods call.

Specified by:
testIterationStart in interface TestListener
Parameters:
event -

getTopicConnectionFactory

public static javax.jms.TopicConnectionFactory getTopicConnectionFactory(Context ctx,
                                                                         String fac)

getQueueConnectionFactory

public static javax.jms.QueueConnectionFactory getQueueConnectionFactory(Context ctx,
                                                                         String fac)

getTopicConnection

public static javax.jms.TopicConnection getTopicConnection()

getQueueConnection

public static javax.jms.QueueConnection getQueueConnection(Context ctx,
                                                           String queueConn)

Apache JMeter

Copyright © 1998-2008 Apache Software Foundation. All Rights Reserved.