Apache JMeter
2.1.1

org.apache.jmeter.protocol.jdbc.config
Class DataSourceElement

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.protocol.jdbc.config.DataSourceElement
All Implemented Interfaces:
Cloneable, ConfigElement, Serializable, TestBean, TestElement, TestListener

public class DataSourceElement
extends AbstractTestElement
implements ConfigElement, TestListener, TestBean

Author:
Michael Stover
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
DataSourceElement()
           
 
Method Summary
 void addConfigElement(ConfigElement config)
          Add a configuration element to this one.
 Object clone()
           
 boolean expectsModification()
          If your config element expects to be modified in the process of a test run, and you want those modifications to carry over from sample to sample (as in a cookie manager - you want to save all cookies that get set throughout the test), then return true for this method.
 String getCheckQuery()
           
 String getConnectionAge()
           
 String getDataSource()
           
 String getDbUrl()
           
 String getDriver()
           
 String getPassword()
           
 String getPoolMax()
           
 String getTimeout()
           
 String getTrimInterval()
           
 String getUsername()
           
 org.apache.avalon.excalibur.datasource.DataSourceComponent initPool()
           
 boolean isAutocommit()
           
 boolean isKeepAlive()
           
 void setAutocommit(boolean autocommit)
           
 void setCheckQuery(String checkQuery)
           
 void setConnectionAge(String connectionAge)
           
 void setDataSource(String dataSource)
           
 void setDbUrl(String dbUrl)
           
 void setDriver(String driver)
           
 void setKeepAlive(boolean keepAlive)
           
 void setPassword(String password)
           
 void setPoolMax(String poolMax)
           
 void setTimeout(String timeout)
           
 void setTrimInterval(String trimInterval)
           
 void setUsername(String username)
           
 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)
           
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, addTestElement, canRemove, clear, clearTemporary, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isEnabled, 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, toString, wait, wait, wait
 

Constructor Detail

DataSourceElement

public DataSourceElement()
Method Detail

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()

testEnded

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

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 -

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()

testStarted

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

clone

public Object clone()
Specified by:
clone in interface ConfigElement
Overrides:
clone in class AbstractTestElement

initPool

public org.apache.avalon.excalibur.datasource.DataSourceComponent initPool()
                                                                    throws Exception
Throws:
Exception

addConfigElement

public void addConfigElement(ConfigElement config)
Description copied from interface: ConfigElement
Add a configuration element to this one. This allows config elements to combine and give a "layered" effect. For example, HTTPConfigElements have properties for domain, path, method, and parameters. If element A has everything filled in, but null for domain, and element B is added, which has only domain filled in, then after adding B to A, A will have the domain from B. If A already had a domain, then the correct behavior is for A to ignore the addition of element B.

Specified by:
addConfigElement in interface ConfigElement
Parameters:
config - the element to be added to this ConfigElement

expectsModification

public boolean expectsModification()
Description copied from interface: ConfigElement
If your config element expects to be modified in the process of a test run, and you want those modifications to carry over from sample to sample (as in a cookie manager - you want to save all cookies that get set throughout the test), then return true for this method. Your config element will not be cloned for each sample. If your config elements are more static in nature, return false. If in doubt, return false.

Specified by:
expectsModification in interface ConfigElement
Returns:
true if the element expects to be modified over the course of a test run

getCheckQuery

public String getCheckQuery()
Returns:
Returns the checkQuery.

setCheckQuery

public void setCheckQuery(String checkQuery)
Parameters:
checkQuery - The checkQuery to set.

getConnectionAge

public String getConnectionAge()
Returns:
Returns the connectionAge.

setConnectionAge

public void setConnectionAge(String connectionAge)
Parameters:
connectionAge - The connectionAge to set.

getDataSource

public String getDataSource()
Returns:
Returns the dataSource.

setDataSource

public void setDataSource(String dataSource)
Parameters:
dataSource - The dataSource to set.

getDbUrl

public String getDbUrl()
Returns:
Returns the dbUrl.

setDbUrl

public void setDbUrl(String dbUrl)
Parameters:
dbUrl - The dbUrl to set.

getDriver

public String getDriver()
Returns:
Returns the driver.

setDriver

public void setDriver(String driver)
Parameters:
driver - The driver to set.

getPassword

public String getPassword()
Returns:
Returns the password.

setPassword

public void setPassword(String password)
Parameters:
password - The password to set.

getPoolMax

public String getPoolMax()
Returns:
Returns the poolMax.

setPoolMax

public void setPoolMax(String poolMax)
Parameters:
poolMax - The poolMax to set.

getTimeout

public String getTimeout()
Returns:
Returns the timeout.

setTimeout

public void setTimeout(String timeout)
Parameters:
timeout - The timeout to set.

getTrimInterval

public String getTrimInterval()
Returns:
Returns the trimInterval.

setTrimInterval

public void setTrimInterval(String trimInterval)
Parameters:
trimInterval - The trimInterval to set.

getUsername

public String getUsername()
Returns:
Returns the username.

setUsername

public void setUsername(String username)
Parameters:
username - The username to set.

isAutocommit

public boolean isAutocommit()
Returns:
Returns the autocommit.

setAutocommit

public void setAutocommit(boolean autocommit)
Parameters:
autocommit - The autocommit to set.

isKeepAlive

public boolean isKeepAlive()
Returns:
Returns the keepAlive.

setKeepAlive

public void setKeepAlive(boolean keepAlive)
Parameters:
keepAlive - The keepAlive to set.

Apache JMeter
2.1.1

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