Apache JMeter
2.0.1.20050615

org.apache.jmeter.protocol.jdbc.sampler
Class JDBCSampler

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.samplers.AbstractSampler
          extended byorg.apache.jmeter.protocol.jdbc.sampler.JDBCSampler
All Implemented Interfaces:
Cloneable, Sampler, Serializable, TestElement, TestListener

public class JDBCSampler
extends AbstractSampler
implements TestListener

A sampler which understands JDBC database requests.

Version:
$Revision: 1.27.2.2 $
Author:
Original author unknown, Jeremy Arnold
See Also:
Serialized Form

Field Summary
static String CONNECTION_POOL_IMPL
           
static String DRIVER
           
static String JDBCSAMPLER_PROPERTY_PREFIX
           
static String QUERY
           
static String URL
           
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
JDBCSampler()
          Creates a JDBCSampler.
 
Method Summary
 String getDriver()
           
 String getPassword()
           
 String getQuery()
           
 String getUrl()
           
 String getUsername()
           
 SampleResult sample(Entry e)
          Obtains statistics about the given Entry, and packages the information into a SampleResult.
 void testEnded()
          Called once for all threads after the end of a test
 void testEnded(String host)
           
 void testIterationStart(LoopIterationEvent event)
          Each time through a Thread Group's test script, an iteration event is fired.
 void testStarted()
          Called just before the start of the test Note that not all the test variables will have been set up at this point.
 void testStarted(String host)
           
 String toString()
           
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isRunningVersion, isTemporary, logProperties, mergeIn, nextIsNull, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse, traverseCollection, traverseMap, traverseProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jmeter.testelement.TestElement
addTestElement, canRemove, clear, clone, getProperty, getPropertyAsBoolean, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse
 

Field Detail

URL

public static final String URL
See Also:
Constant Field Values

DRIVER

public static final String DRIVER
See Also:
Constant Field Values

QUERY

public static final String QUERY
See Also:
Constant Field Values

JDBCSAMPLER_PROPERTY_PREFIX

public static final String JDBCSAMPLER_PROPERTY_PREFIX
See Also:
Constant Field Values

CONNECTION_POOL_IMPL

public static final String CONNECTION_POOL_IMPL
See Also:
Constant Field Values
Constructor Detail

JDBCSampler

public JDBCSampler()
Creates a JDBCSampler.

Method Detail

sample

public SampleResult sample(Entry e)
Description copied from interface: Sampler
Obtains statistics about the given Entry, and packages the information into a SampleResult.

Specified by:
sample in interface Sampler

getDriver

public String getDriver()

getUrl

public String getUrl()

getUsername

public String getUsername()

getPassword

public String getPassword()

getQuery

public String getQuery()

toString

public String toString()

testStarted

public void testStarted(String host)
Specified by:
testStarted in interface TestListener

testStarted

public void testStarted()
Description copied from interface: TestListener
Called just before the start of the test 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 host)
Specified by:
testEnded in interface TestListener

testEnded

public void testEnded()
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()

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.

Specified by:
testIterationStart in interface TestListener
Parameters:
event -

Apache JMeter
2.0.1.20050615

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