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

Author:
pete 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. Note that not all the test variables will have been set up at this point.

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.

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.

Specified by:
testIterationStart in interface TestListener
Parameters:
event -

getTopicConnectionFactory

public static javax.jms.TopicConnectionFactory getTopicConnectionFactory(Context ctx,
                                                                         String fac)
Parameters:
ctx -
fac -
Returns:

getQueueConnectionFactory

public static javax.jms.QueueConnectionFactory getQueueConnectionFactory(Context ctx,
                                                                         String fac)
Parameters:
ctx -
fac -
Returns:

getTopicConnection

public static javax.jms.TopicConnection getTopicConnection()
Returns:

getQueueConnection

public static javax.jms.QueueConnection getQueueConnection(Context ctx,
                                                           String queueConn)
Parameters:
ctx -
queueConn -
Returns:

Apache JMeter

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