|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jmeter.testelement.AbstractTestElement org.apache.jmeter.protocol.jdbc.AbstractJDBCTestElement
public abstract class AbstractJDBCTestElement
A base class for all JDBC test elements handling the basics of a SQL request.
Field Summary | |
---|---|
protected static String |
ENCODING
|
Fields inherited from interface org.apache.jmeter.testelement.TestElement |
---|
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS |
Constructor Summary | |
---|---|
protected |
AbstractJDBCTestElement()
Creates a JDBCSampler. |
Method Summary | |
---|---|
static void |
close(Connection c)
|
static void |
close(ResultSet rs)
|
static void |
close(Statement s)
|
protected byte[] |
execute(Connection conn)
Execute the test element. |
String |
getDataSource()
|
String |
getQuery()
|
String |
getQueryArguments()
|
String |
getQueryArgumentsTypes()
|
String |
getQueryType()
|
String |
getResultVariable()
|
List<String> |
getSearchableTokens()
}} |
String |
getVariableNames()
|
void |
setDataSource(String dataSource)
|
void |
setQuery(String query)
|
void |
setQueryArguments(String queryArguments)
|
void |
setQueryArgumentsTypes(String queryArgumentsType)
|
void |
setQueryType(String queryType)
|
void |
setResultVariable(String resultVariable)
|
void |
setVariableNames(String variableNames)
|
void |
testEnded()
Called once for all threads after the end of a test. |
void |
testEnded(String host)
Called once for all threads after the end of a test. |
void |
testStarted()
Called just before the start of the test from the main engine thread. |
void |
testStarted(String host)
Called just before the start of the test from the main engine thread. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String ENCODING
Constructor Detail |
---|
protected AbstractJDBCTestElement()
Method Detail |
---|
protected byte[] execute(Connection conn) throws SQLException, UnsupportedEncodingException, IOException, UnsupportedOperationException
conn
- a SampleResult
in case the test should sample; null
if only execution is requested
UnsupportedOperationException
- if the user provided incorrect query type
SQLException
UnsupportedEncodingException
IOException
public static void close(Connection c)
public static void close(Statement s)
public static void close(ResultSet rs)
public String getQuery()
public String toString()
toString
in class Object
public void setQuery(String query)
query
- The query to set.public String getDataSource()
public void setDataSource(String dataSource)
dataSource
- The dataSource to set.public String getQueryType()
public void setQueryType(String queryType)
queryType
- The queryType to set.public String getQueryArguments()
public void setQueryArguments(String queryArguments)
public String getQueryArgumentsTypes()
public void setQueryArgumentsTypes(String queryArgumentsType)
public String getVariableNames()
public void setVariableNames(String variableNames)
variableNames
- the variableNames to setpublic String getResultVariable()
public void setResultVariable(String resultVariable)
resultVariable
- the variable name in which results will be storedpublic List<String> getSearchableTokens() throws Exception
getSearchableTokens
in interface Searchable
getSearchableTokens
in class AbstractTestElement
Exception
public void testStarted()
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.
testStarted
in interface TestStateListener
TestStateListener.testStarted()
public void testStarted(String host)
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.
testStarted
in interface TestStateListener
host
- name of hostTestStateListener.testStarted(java.lang.String)
public void testEnded()
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.
testEnded
in interface TestStateListener
TestStateListener.testEnded()
public void testEnded(String host)
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.
testEnded
in interface TestStateListener
host
- name of hostTestStateListener.testEnded(java.lang.String)
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |