org.apache.jmeter.protocol.jdbc.sampler

Class JDBCSampler

Implemented Interfaces:
Cloneable, Sampler, Serializable, TestBean, TestElement

public class JDBCSampler
extends AbstractSampler
implements TestBean

A sampler which understands JDBC database requests.

Fields inherited from interface org.apache.jmeter.testelement.TestElement

COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS

Constructor Summary

JDBCSampler()
Creates a JDBCSampler.

Method Summary

static void
close(Connection c)
static void
close(ResultSet rs)
static void
close(Statement s)
String
getDataSource()
String
getQuery()
String
getQueryArguments()
String
getQueryArgumentsTypes()
String
getQueryType()
String
getVariableNames()
SampleResult
sample(Entry e)
Obtains statistics about the given Entry, and packages the information into a SampleResult.
void
setDataSource(String dataSource)
void
setQuery(String query)
void
setQueryArguments(String queryArguments)
void
setQueryArgumentsTypes(String queryArgumentsType)
void
setQueryType(String queryType)
void
setVariableNames(String variableNames)
String
toString()

Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty

Constructor Details

JDBCSampler

public JDBCSampler()
Creates a JDBCSampler.

Method Details

close

public static void close(Connection c)

close

public static void close(ResultSet rs)

close

public static void close(Statement s)

getDataSource

public String getDataSource()
Returns:
Returns the dataSource.

getQuery

public String getQuery()

getQueryArguments

public String getQueryArguments()

getQueryArgumentsTypes

public String getQueryArgumentsTypes()

getQueryType

public String getQueryType()
Returns:
Returns the queryType.

getVariableNames

public String getVariableNames()
Returns:
the variableNames

sample

public SampleResult sample(Entry e)
Obtains statistics about the given Entry, and packages the information into a SampleResult.
Specified by:
sample in interface Sampler

setDataSource

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

setQuery

public void setQuery(String query)
Parameters:
query - The query to set.

setQueryArguments

public void setQueryArguments(String queryArguments)

setQueryArgumentsTypes

public void setQueryArgumentsTypes(String queryArgumentsType)

setQueryType

public void setQueryType(String queryType)
Parameters:
queryType - The queryType to set.

setVariableNames

public void setVariableNames(String variableNames)
Parameters:
variableNames - the variableNames to set

toString

public String toString()

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