public class JavaSampler
extends org.apache.jmeter.samplers.AbstractSampler
implements org.apache.jmeter.testelement.TestStateListener, org.apache.jmeter.samplers.Interruptible
JavaSamplerClient and AbstractJavaSamplerClient for
information on writing Java code to be executed by this sampler.| Modifier and Type | Field and Description |
|---|---|
static String |
ARGUMENTS
Property key representing the arguments for the JavaSamplerClient.
|
static String |
CLASSNAME
Property key representing the classname of the JavaSamplerClient to user.
|
| Constructor and Description |
|---|
JavaSampler()
Create a JavaSampler.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
applies(org.apache.jmeter.config.ConfigTestElement configElement) |
Object |
clone() |
org.apache.jmeter.config.Arguments |
getArguments()
Get the arguments (parameters) for the JavaSamplerClient to be executed
with.
|
String |
getClassname()
Gets the Classname attribute of the JavaConfig object
|
boolean |
interrupt() |
org.apache.jmeter.samplers.SampleResult |
sample(org.apache.jmeter.samplers.Entry entry)
Performs a test sample.
|
void |
setArguments(org.apache.jmeter.config.Arguments args)
Set the arguments (parameters) for the JavaSamplerClient to be executed
with.
|
void |
setClassname(String classname)
Sets the Classname attribute of the JavaConfig object
|
void |
testEnded()
Method called at the end of the test.
|
void |
testEnded(String host) |
void |
testStarted() |
void |
testStarted(String host) |
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traversePropertyfinalize, getClass, notify, notifyAll, toString, wait, wait, waitaddTestElement, canRemove, clear, clearTestElementChildren, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traversepublic static final String CLASSNAME
public static final String ARGUMENTS
public Object clone()
clone in interface org.apache.jmeter.testelement.TestElementclone in class org.apache.jmeter.testelement.AbstractTestElementpublic void setArguments(org.apache.jmeter.config.Arguments args)
args - the new arguments. These replace any existing arguments.public org.apache.jmeter.config.Arguments getArguments()
public void setClassname(String classname)
classname - the new Classname valuepublic String getClassname()
public org.apache.jmeter.samplers.SampleResult sample(org.apache.jmeter.samplers.Entry entry)
sample() method retrieves the reference to the Java
client and calls its runTest() method.sample in interface org.apache.jmeter.samplers.Samplerentry - the Entry for this sampleJavaSamplerClient.runTest(JavaSamplerContext)public void testStarted()
testStarted in interface org.apache.jmeter.testelement.TestStateListenerpublic void testStarted(String host)
testStarted in interface org.apache.jmeter.testelement.TestStateListenerpublic void testEnded()
testEnded in interface org.apache.jmeter.testelement.TestStateListenerpublic void testEnded(String host)
testEnded in interface org.apache.jmeter.testelement.TestStateListenerpublic boolean applies(org.apache.jmeter.config.ConfigTestElement configElement)
applies in interface org.apache.jmeter.engine.util.ConfigMergabilityIndicatorapplies in class org.apache.jmeter.samplers.AbstractSamplerAbstractSampler.applies(org.apache.jmeter.config.ConfigTestElement)public boolean interrupt()
interrupt in interface org.apache.jmeter.samplers.InterruptibleCopyright © 1998-2020 Apache Software Foundation. All Rights Reserved.